x86: introduce smpboot_clear_io_apic
authorGlauber de Oliveira Costa <gcosta@redhat.com>
Wed, 19 Mar 2008 17:26:10 +0000 (14:26 -0300)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:41:04 +0000 (17:41 +0200)
x86_64 has two nr_ioapics = 0 statements. In 32-bit, it can be done
too. We do it through the smpboot_clear_io_apic() inline function,
to cope with subarchitectures (visws) that does not compile mpparse in

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/smpboot_32.c
arch/x86/kernel/smpboot_64.c
include/asm-x86/mach-default/smpboot_hooks.h
include/asm-x86/mach-visws/smpboot_hooks.h

index ae23b603978c081e6bbc2b5ad5275ae96b60f042..5a0f57f3519115f2ba85ca90b119f07229212a9d 100644 (file)
@@ -155,6 +155,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
                printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n",
                        boot_cpu_physical_apicid);
                printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n");
+               smpboot_clear_io_apic();
                return -1;
        }
 
@@ -173,6 +174,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
                        setup_local_APIC();
                        end_local_APIC_setup();
                }
+               smpboot_clear_io_apic();
                return -1;
        }
        return 0;
index c66fb15b013126738a1c46593bbd2eb452f58bfa..775244545ffae5445cc2f7cb185797095008dc6d 100644 (file)
@@ -134,7 +134,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
                printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n",
                        boot_cpu_physical_apicid);
                printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n");
-               nr_ioapics = 0;
+               smpboot_clear_io_apic();
                return -1;
        }
 
@@ -145,7 +145,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
         */
        if (!max_cpus) {
                printk(KERN_INFO "SMP mode deactivated, forcing use of dummy APIC emulation.\n");
-               nr_ioapics = 0;
+               smpboot_clear_io_apic();
                return -1;
        }
 
index 8e1c6c06d0574cb7aa01a372786b922a82c27806..3ff2c5bff93a6c0bd014f538ec41c85b1d31691f 100644 (file)
@@ -44,3 +44,8 @@ static inline void smpboot_setup_io_apic(void)
        else
                nr_ioapics = 0;
 }
+
+static inline void smpboot_clear_io_apic(void)
+{
+       nr_ioapics = 0;
+}
index d926471fa3597215d07817defd8866602f0cd7d3..c9b83e395a2ee60327f181b4d3ac87804c4f984c 100644 (file)
@@ -22,3 +22,7 @@ static inline void smpboot_restore_warm_reset_vector(void)
 static inline void smpboot_setup_io_apic(void)
 {
 }
+
+static inline void smpboot_clear_io_apic(void)
+{
+}