Re: [PATCH] pci/intr_remapping: allocate irq_iommu on node -v2

From: Ingo Molnar
Date: Tue Aug 11 2009 - 09:25:37 EST



* Yinghai Lu <yinghai@xxxxxxxxxx> wrote:

> static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq)
> {
> - return irq_2_iommu_alloc_node(irq, cpu_to_node(boot_cpu_id));
> + int node;
> +
> +#ifdef CONFIG_SMP
> + node = irq_to_desc(irq)->node;
> +#else
> + node = cpu_to_node(boot_cpu_id);
> +#endif
> +
> + return irq_2_iommu_alloc_node(irq, node);
> }

To avoid the ifdef, shouldnt there be an new irq_node(irq) primitive
that maps to desc->node on SMP and does the right thing on UP?

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/