aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-03-19 13:26:09 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:41:04 -0400
commit771263d31114adb5e234364a58280c876c2ed182 (patch)
tree31c45c2dce6c8282afe02055bb66918d05309a7c /arch
parent0df1ba8cabc6c2d613921c75e525826e6eb3210b (diff)
x86: change x86_64 sanity checks to match i386.
They are mostly inocuous. APIC_INTEGRATED will expand to 1, check_phys_apicid_present is checking for the same thing it was before, etc. But the code is identical to i386 now, and will allow us to integrate it. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/smpboot_64.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c
index 6679ac502160..c66fb15b0131 100644
--- a/arch/x86/kernel/smpboot_64.c
+++ b/arch/x86/kernel/smpboot_64.c
@@ -50,6 +50,7 @@
50#include <linux/smp.h> 50#include <linux/smp.h>
51#include <linux/kdebug.h> 51#include <linux/kdebug.h>
52 52
53#include <asm/acpi.h>
53#include <asm/mtrr.h> 54#include <asm/mtrr.h>
54#include <asm/pgalloc.h> 55#include <asm/pgalloc.h>
55#include <asm/desc.h> 56#include <asm/desc.h>
@@ -105,7 +106,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
105 * If we couldn't find an SMP configuration at boot time, 106 * If we couldn't find an SMP configuration at boot time,
106 * get out of here now! 107 * get out of here now!
107 */ 108 */
108 if (!smp_found_config) { 109 if (!smp_found_config && !acpi_lapic) {
109 printk(KERN_NOTICE "SMP motherboard not detected.\n"); 110 printk(KERN_NOTICE "SMP motherboard not detected.\n");
110 disable_smp(); 111 disable_smp();
111 if (APIC_init_uniprocessor()) 112 if (APIC_init_uniprocessor())
@@ -118,7 +119,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
118 * Should not be necessary because the MP table should list the boot 119 * Should not be necessary because the MP table should list the boot
119 * CPU too, but we do it for the sake of robustness anyway. 120 * CPU too, but we do it for the sake of robustness anyway.
120 */ 121 */
121 if (!physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map)) { 122 if (!check_phys_apicid_present(boot_cpu_physical_apicid)) {
122 printk(KERN_NOTICE 123 printk(KERN_NOTICE
123 "weird, boot CPU (#%d) not listed by the BIOS.\n", 124 "weird, boot CPU (#%d) not listed by the BIOS.\n",
124 boot_cpu_physical_apicid); 125 boot_cpu_physical_apicid);
@@ -128,7 +129,8 @@ static int __init smp_sanity_check(unsigned max_cpus)
128 /* 129 /*
129 * If we couldn't find a local APIC, then get out of here now! 130 * If we couldn't find a local APIC, then get out of here now!
130 */ 131 */
131 if (!cpu_has_apic) { 132 if (APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid]) &&
133 !cpu_has_apic) {
132 printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n", 134 printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n",
133 boot_cpu_physical_apicid); 135 boot_cpu_physical_apicid);
134 printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n"); 136 printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n");
@@ -136,6 +138,8 @@ static int __init smp_sanity_check(unsigned max_cpus)
136 return -1; 138 return -1;
137 } 139 }
138 140
141 verify_local_APIC();
142
139 /* 143 /*
140 * If SMP should be disabled, then really disable it! 144 * If SMP should be disabled, then really disable it!
141 */ 145 */