aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-04-27 21:01:50 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-28 06:21:18 -0400
commit024154cfdd802654cb236a18c78b6e37351e2c49 (patch)
tree03fa7789e410e48b105ec010e6827fad27d7dc95 /arch/x86
parenta2f809b08ae4dddc1015c7dcd8659e5729e45b3e (diff)
irq: change io_apic_set_pci_routing() to use device parameter
Make actual use of the device parameter passed down to io_apic_set_pci_routing() - to have the IRQ descriptor on the home node of the device. If no device has been passed down, we assume it's a platform device and use the boot node ID for the IRQ descriptor. [ Impact: optimization, make IO-APIC code more NUMA aware ] Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Suresh Siddha <suresh.b.siddha@intel.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Rusty Russell <rusty@rustcorp.com.au> LKML-Reference: <49F6557E.3080101@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/apic/io_apic.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index d9346622601b..82376e021b5d 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3963,7 +3963,7 @@ int io_apic_set_pci_routing(struct device *dev, int ioapic, int pin, int irq,
3963{ 3963{
3964 struct irq_desc *desc; 3964 struct irq_desc *desc;
3965 struct irq_cfg *cfg; 3965 struct irq_cfg *cfg;
3966 int node = cpu_to_node(boot_cpu_id); 3966 int node;
3967 3967
3968 if (!IO_APIC_IRQ(irq)) { 3968 if (!IO_APIC_IRQ(irq)) {
3969 apic_printk(APIC_QUIET,KERN_ERR "IOAPIC[%d]: Invalid reference to IRQ 0\n", 3969 apic_printk(APIC_QUIET,KERN_ERR "IOAPIC[%d]: Invalid reference to IRQ 0\n",
@@ -3971,6 +3971,11 @@ int io_apic_set_pci_routing(struct device *dev, int ioapic, int pin, int irq,
3971 return -EINVAL; 3971 return -EINVAL;
3972 } 3972 }
3973 3973
3974 if (dev)
3975 node = dev_to_node(dev);
3976 else
3977 node = cpu_to_node(boot_cpu_id);
3978
3974 desc = irq_to_desc_alloc_node(irq, node); 3979 desc = irq_to_desc_alloc_node(irq, node);
3975 if (!desc) { 3980 if (!desc) {
3976 printk(KERN_INFO "can not get irq_desc %d\n", irq); 3981 printk(KERN_INFO "can not get irq_desc %d\n", irq);