aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/apic/apic.c9
-rw-r--r--arch/x86/kernel/smpboot.c8
2 files changed, 13 insertions, 4 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index e82488d3f0ba..a4c9cf0bf70b 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -249,7 +249,7 @@ static void native_apic_write_dummy(u32 reg, u32 v)
249 249
250static u32 native_apic_read_dummy(u32 reg) 250static u32 native_apic_read_dummy(u32 reg)
251{ 251{
252 WARN_ON_ONCE((cpu_has_apic || !disable_apic)); 252 WARN_ON_ONCE((cpu_has_apic && !disable_apic));
253 return 0; 253 return 0;
254} 254}
255 255
@@ -1609,6 +1609,13 @@ void __init init_apic_mappings(void)
1609 new_apicid = read_apic_id(); 1609 new_apicid = read_apic_id();
1610 if (boot_cpu_physical_apicid != new_apicid) { 1610 if (boot_cpu_physical_apicid != new_apicid) {
1611 boot_cpu_physical_apicid = new_apicid; 1611 boot_cpu_physical_apicid = new_apicid;
1612 /*
1613 * yeah -- we lie about apic_version
1614 * in case if apic was disabled via boot option
1615 * but it's not a problem for SMP compiled kernel
1616 * since smp_sanity_check is prepared for such a case
1617 * and disable smp mode
1618 */
1612 apic_version[new_apicid] = 1619 apic_version[new_apicid] =
1613 GET_APIC_VERSION(apic_read(APIC_LVR)); 1620 GET_APIC_VERSION(apic_read(APIC_LVR));
1614 } 1621 }
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index d2e8de958156..7c80007ea5f7 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -992,10 +992,12 @@ static int __init smp_sanity_check(unsigned max_cpus)
992 */ 992 */
993 if (APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid]) && 993 if (APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid]) &&
994 !cpu_has_apic) { 994 !cpu_has_apic) {
995 printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n", 995 if (!disable_apic) {
996 boot_cpu_physical_apicid); 996 pr_err("BIOS bug, local APIC #%d not detected!...\n",
997 printk(KERN_ERR "... forcing use of dummy APIC emulation." 997 boot_cpu_physical_apicid);
998 pr_err("... forcing use of dummy APIC emulation."
998 "(tell your hw vendor)\n"); 999 "(tell your hw vendor)\n");
1000 }
999 smpboot_clear_io_apic(); 1001 smpboot_clear_io_apic();
1000 arch_disable_smp_support(); 1002 arch_disable_smp_support();
1001 return -1; 1003 return -1;