diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-03-19 13:25:55 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:02 -0400 |
commit | b9f9294a86fd274e4055891450033e8bc9d68f66 (patch) | |
tree | a15e1a0b109e10a76802c5c42dafce23d57087c7 | |
parent | 071782692798d7a6e0a5679f3186ea7fea49fd62 (diff) |
x86: add callin tests to cpu_up
Now that we boot cpus here, callin_map has this meaning (same
as x86_64)
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/smpboot_32.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c index 4ba5ab2d81fb..33758a2ddd48 100644 --- a/arch/x86/kernel/smpboot_32.c +++ b/arch/x86/kernel/smpboot_32.c | |||
@@ -839,6 +839,7 @@ int __cpuinit native_cpu_up(unsigned int cpu) | |||
839 | { | 839 | { |
840 | int apicid = cpu_present_to_apicid(cpu); | 840 | int apicid = cpu_present_to_apicid(cpu); |
841 | unsigned long flags; | 841 | unsigned long flags; |
842 | int err; | ||
842 | 843 | ||
843 | WARN_ON(irqs_disabled()); | 844 | WARN_ON(irqs_disabled()); |
844 | 845 | ||
@@ -851,6 +852,14 @@ int __cpuinit native_cpu_up(unsigned int cpu) | |||
851 | } | 852 | } |
852 | 853 | ||
853 | /* | 854 | /* |
855 | * Already booted CPU? | ||
856 | */ | ||
857 | if (cpu_isset(cpu, cpu_callin_map)) { | ||
858 | Dprintk("do_boot_cpu %d Already started\n", cpu); | ||
859 | return -ENOSYS; | ||
860 | } | ||
861 | |||
862 | /* | ||
854 | * Save current MTRR state in case it was changed since early boot | 863 | * Save current MTRR state in case it was changed since early boot |
855 | * (e.g. by the ACPI SMI) to initialize new CPUs with MTRRs in sync: | 864 | * (e.g. by the ACPI SMI) to initialize new CPUs with MTRRs in sync: |
856 | */ | 865 | */ |
@@ -863,15 +872,12 @@ int __cpuinit native_cpu_up(unsigned int cpu) | |||
863 | min_t(unsigned long, KERNEL_PGD_PTRS, USER_PGD_PTRS)); | 872 | min_t(unsigned long, KERNEL_PGD_PTRS, USER_PGD_PTRS)); |
864 | flush_tlb_all(); | 873 | flush_tlb_all(); |
865 | 874 | ||
866 | do_boot_cpu(apicid, cpu); | 875 | err = do_boot_cpu(apicid, cpu); |
867 | 876 | if (err < 0) { | |
868 | /* In case one didn't come up */ | 877 | Dprintk("do_boot_cpu failed %d\n", err); |
869 | if (!cpu_isset(cpu, cpu_callin_map)) { | 878 | return err; |
870 | printk(KERN_DEBUG "skipping cpu%d, didn't come online\n", cpu); | ||
871 | return -EIO; | ||
872 | } | 879 | } |
873 | 880 | ||
874 | |||
875 | /* | 881 | /* |
876 | * Check TSC synchronization with the AP (keep irqs disabled | 882 | * Check TSC synchronization with the AP (keep irqs disabled |
877 | * while doing so): | 883 | * while doing so): |