diff options
-rw-r--r-- | arch/x86_64/kernel/setup64.c | 4 | ||||
-rw-r--r-- | arch/x86_64/kernel/smpboot.c | 6 | ||||
-rw-r--r-- | include/asm-x86_64/smp.h | 1 |
3 files changed, 6 insertions, 5 deletions
diff --git a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c index bd33be24a386..79190891fbc5 100644 --- a/arch/x86_64/kernel/setup64.c +++ b/arch/x86_64/kernel/setup64.c | |||
@@ -87,6 +87,10 @@ void __init setup_per_cpu_areas(void) | |||
87 | int i; | 87 | int i; |
88 | unsigned long size; | 88 | unsigned long size; |
89 | 89 | ||
90 | #ifdef CONFIG_HOTPLUG_CPU | ||
91 | prefill_possible_map(); | ||
92 | #endif | ||
93 | |||
90 | /* Copy section for each CPU (we discard the original) */ | 94 | /* Copy section for each CPU (we discard the original) */ |
91 | size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES); | 95 | size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES); |
92 | #ifdef CONFIG_MODULES | 96 | #ifdef CONFIG_MODULES |
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index e12d7baeb33e..658a81b33f3b 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c | |||
@@ -892,7 +892,7 @@ static __init void disable_smp(void) | |||
892 | * those NR_CPUS, hence cpu_possible_map represents entire NR_CPUS range. | 892 | * those NR_CPUS, hence cpu_possible_map represents entire NR_CPUS range. |
893 | * - Ashok Raj | 893 | * - Ashok Raj |
894 | */ | 894 | */ |
895 | static void prefill_possible_map(void) | 895 | __init void prefill_possible_map(void) |
896 | { | 896 | { |
897 | int i; | 897 | int i; |
898 | for (i = 0; i < NR_CPUS; i++) | 898 | for (i = 0; i < NR_CPUS; i++) |
@@ -967,10 +967,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
967 | current_cpu_data = boot_cpu_data; | 967 | current_cpu_data = boot_cpu_data; |
968 | current_thread_info()->cpu = 0; /* needed? */ | 968 | current_thread_info()->cpu = 0; /* needed? */ |
969 | 969 | ||
970 | #ifdef CONFIG_HOTPLUG_CPU | ||
971 | prefill_possible_map(); | ||
972 | #endif | ||
973 | |||
974 | if (smp_sanity_check(max_cpus) < 0) { | 970 | if (smp_sanity_check(max_cpus) < 0) { |
975 | printk(KERN_INFO "SMP disabled\n"); | 971 | printk(KERN_INFO "SMP disabled\n"); |
976 | disable_smp(); | 972 | disable_smp(); |
diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h index 24e32611f0bf..c57ce4071342 100644 --- a/include/asm-x86_64/smp.h +++ b/include/asm-x86_64/smp.h | |||
@@ -81,6 +81,7 @@ static inline int hard_smp_processor_id(void) | |||
81 | extern int safe_smp_processor_id(void); | 81 | extern int safe_smp_processor_id(void); |
82 | extern int __cpu_disable(void); | 82 | extern int __cpu_disable(void); |
83 | extern void __cpu_die(unsigned int cpu); | 83 | extern void __cpu_die(unsigned int cpu); |
84 | extern void prefill_possible_map(void); | ||
84 | 85 | ||
85 | #endif /* !ASSEMBLY */ | 86 | #endif /* !ASSEMBLY */ |
86 | 87 | ||