x86: add setup_ioapic_ids for numaq in x86_quirks
authorYinghai Lu <yhlu.kernel@gmail.com>
Fri, 25 Jul 2008 09:14:28 +0000 (02:14 -0700)
committerIngo Molnar <mingo@elte.hu>
Sat, 26 Jul 2008 14:31:33 +0000 (16:31 +0200)
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/io_apic_32.c
arch/x86/kernel/numaq_32.c
include/asm-x86/setup.h

index 98e4db5373f34027c5cfa1050af81bc7c4218608..72ba06314c7b2ee2911d5a35fda07e99a891c097 100644 (file)
@@ -46,6 +46,7 @@
 #include <asm/nmi.h>
 #include <asm/msidef.h>
 #include <asm/hypertransport.h>
+#include <asm/setup.h>
 
 #include <mach_apic.h>
 #include <mach_apicdef.h>
@@ -1728,10 +1729,8 @@ static void __init setup_ioapic_ids_from_mpc(void)
        unsigned char old_id;
        unsigned long flags;
 
-#ifdef CONFIG_X86_NUMAQ
-       if (found_numaq)
+       if (x86_quirks->setup_ioapic_ids && x86_quirks->setup_ioapic_ids())
                return;
-#endif
 
        /*
         * Don't check I/O APIC IDs for xAPIC systems.  They have
index b8c45610b20a89a6f52f9b266d68de042d688168..2434467ddf72a9722553e880917361d699b4c1be 100644 (file)
@@ -229,6 +229,12 @@ static void __init smp_read_mpc_oem(struct mp_config_oemtable *oemtable,
        }
 }
 
+static int __init numaq_setup_ioapic_ids(void)
+{
+       /* so can skip it */
+       return 1;
+}
+
 static struct x86_quirks numaq_x86_quirks __initdata = {
        .arch_pre_time_init     = numaq_pre_time_init,
        .arch_time_init         = NULL,
@@ -243,6 +249,7 @@ static struct x86_quirks numaq_x86_quirks __initdata = {
        .mpc_oem_bus_info       = mpc_oem_bus_info,
        .mpc_oem_pci_bus        = mpc_oem_pci_bus,
        .smp_read_mpc_oem       = smp_read_mpc_oem,
+       .setup_ioapic_ids       = numaq_setup_ioapic_ids,
 };
 
 void numaq_mps_oem_check(struct mp_config_table *mpc, char *oem,
index b7aeba94e43078cfc45361ed30567b3b52b81c1b..80fcc0de80be3755e7e9666b8bd5b78b5aa57d97 100644 (file)
@@ -38,6 +38,7 @@ struct x86_quirks {
        void (*mpc_oem_pci_bus)(struct mpc_config_bus *m);
        void (*smp_read_mpc_oem)(struct mp_config_oemtable *oemtable,
                                     unsigned short oemsize);
+       int (*setup_ioapic_ids)(void);
 };
 
 extern struct x86_quirks *x86_quirks;