diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/smpboot_64.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c index ddefb38c53fb..8ac8eb620428 100644 --- a/arch/x86/kernel/smpboot_64.c +++ b/arch/x86/kernel/smpboot_64.c | |||
@@ -861,6 +861,18 @@ void __init smp_set_apicids(void) | |||
861 | x86_cpu_to_apicid_ptr = NULL; | 861 | x86_cpu_to_apicid_ptr = NULL; |
862 | } | 862 | } |
863 | 863 | ||
864 | static void __init smp_cpu_index_default(void) | ||
865 | { | ||
866 | int i; | ||
867 | struct cpuinfo_x86 *c; | ||
868 | |||
869 | for_each_cpu_mask(i, cpu_possible_map) { | ||
870 | c = &cpu_data(i); | ||
871 | /* mark all to hotplug */ | ||
872 | c->cpu_index = NR_CPUS; | ||
873 | } | ||
874 | } | ||
875 | |||
864 | /* | 876 | /* |
865 | * Prepare for SMP bootup. The MP table or ACPI has been read | 877 | * Prepare for SMP bootup. The MP table or ACPI has been read |
866 | * earlier. Just do some sanity checking here and enable APIC mode. | 878 | * earlier. Just do some sanity checking here and enable APIC mode. |
@@ -868,6 +880,7 @@ void __init smp_set_apicids(void) | |||
868 | void __init smp_prepare_cpus(unsigned int max_cpus) | 880 | void __init smp_prepare_cpus(unsigned int max_cpus) |
869 | { | 881 | { |
870 | nmi_watchdog_default(); | 882 | nmi_watchdog_default(); |
883 | smp_cpu_index_default(); | ||
871 | current_cpu_data = boot_cpu_data; | 884 | current_cpu_data = boot_cpu_data; |
872 | current_thread_info()->cpu = 0; /* needed? */ | 885 | current_thread_info()->cpu = 0; /* needed? */ |
873 | smp_set_apicids(); | 886 | smp_set_apicids(); |