Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] x86_64: Allocate cpu local data for all possible CPUs

CPU hotplug fills up the possible map to NR_CPUs, but it did that after
setting up per CPU data. This lead to CPU data not getting allocated
for all possible CPUs, which lead to various side effects.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Andi Kleen and committed by
Linus Torvalds
421c7ce6 af74c3a6

+6 -5
+4
arch/x86_64/kernel/setup64.c
··· 87 87 int i; 88 88 unsigned long size; 89 89 90 + #ifdef CONFIG_HOTPLUG_CPU 91 + prefill_possible_map(); 92 + #endif 93 + 90 94 /* Copy section for each CPU (we discard the original) */ 91 95 size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES); 92 96 #ifdef CONFIG_MODULES
+1 -5
arch/x86_64/kernel/smpboot.c
··· 892 892 * those NR_CPUS, hence cpu_possible_map represents entire NR_CPUS range. 893 893 * - Ashok Raj 894 894 */ 895 - static void prefill_possible_map(void) 895 + __init void prefill_possible_map(void) 896 896 { 897 897 int i; 898 898 for (i = 0; i < NR_CPUS; i++) ··· 966 966 nmi_watchdog_default(); 967 967 current_cpu_data = boot_cpu_data; 968 968 current_thread_info()->cpu = 0; /* needed? */ 969 - 970 - #ifdef CONFIG_HOTPLUG_CPU 971 - prefill_possible_map(); 972 - #endif 973 969 974 970 if (smp_sanity_check(max_cpus) < 0) { 975 971 printk(KERN_INFO "SMP disabled\n");
+1
include/asm-x86_64/smp.h
··· 81 81 extern int safe_smp_processor_id(void); 82 82 extern int __cpu_disable(void); 83 83 extern void __cpu_die(unsigned int cpu); 84 + extern void prefill_possible_map(void); 84 85 85 86 #endif /* !ASSEMBLY */ 86 87