diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-03-19 13:25:15 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:00 -0400 |
commit | f915d7f46b84192a19647c8e6b111a7e518875cb (patch) | |
tree | 2f45f895e62233677aadc0ae9abbfc162eeaf0fc /arch/x86/kernel/smpboot_32.c | |
parent | b675f11127291cdb6a090ece289e4f9a0b1d609e (diff) |
x86: do tests before do_boot_cpu in i386
Do tests before do_boot_cpu in native_cpu_up for i386.
Tests are a little bit broader than originally, and are the
same as x86_64. Test for smp_callin is not applicable right now
and is deferred.
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/smpboot_32.c')
-rw-r--r-- | arch/x86/kernel/smpboot_32.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c index 8144aa3a1edf..147af81f70ea 100644 --- a/arch/x86/kernel/smpboot_32.c +++ b/arch/x86/kernel/smpboot_32.c | |||
@@ -711,10 +711,6 @@ static int __cpuinit __smp_prepare_cpu(int cpu) | |||
711 | int apicid, ret; | 711 | int apicid, ret; |
712 | 712 | ||
713 | apicid = per_cpu(x86_cpu_to_apicid, cpu); | 713 | apicid = per_cpu(x86_cpu_to_apicid, cpu); |
714 | if (apicid == BAD_APICID) { | ||
715 | ret = -ENODEV; | ||
716 | goto exit; | ||
717 | } | ||
718 | 714 | ||
719 | info.complete = &done; | 715 | info.complete = &done; |
720 | info.apicid = apicid; | 716 | info.apicid = apicid; |
@@ -952,10 +948,22 @@ void __init native_smp_prepare_boot_cpu(void) | |||
952 | 948 | ||
953 | int __cpuinit native_cpu_up(unsigned int cpu) | 949 | int __cpuinit native_cpu_up(unsigned int cpu) |
954 | { | 950 | { |
951 | int apicid = cpu_present_to_apicid(cpu); | ||
955 | unsigned long flags; | 952 | unsigned long flags; |
956 | #ifdef CONFIG_HOTPLUG_CPU | ||
957 | int ret = 0; | 953 | int ret = 0; |
958 | 954 | ||
955 | WARN_ON(irqs_disabled()); | ||
956 | |||
957 | Dprintk("++++++++++++++++++++=_---CPU UP %u\n", cpu); | ||
958 | |||
959 | if (apicid == BAD_APICID || apicid == boot_cpu_physical_apicid || | ||
960 | !physid_isset(apicid, phys_cpu_present_map)) { | ||
961 | printk(KERN_ERR "%s: bad cpu %d\n", __func__, cpu); | ||
962 | return -EINVAL; | ||
963 | } | ||
964 | |||
965 | #ifdef CONFIG_HOTPLUG_CPU | ||
966 | |||
959 | /* | 967 | /* |
960 | * We do warm boot only on cpus that had booted earlier | 968 | * We do warm boot only on cpus that had booted earlier |
961 | * Otherwise cold boot is all handled from smp_boot_cpus(). | 969 | * Otherwise cold boot is all handled from smp_boot_cpus(). |