aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r--arch/x86/kernel/cpu/common.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 3f95a40f718a..83492b1f93b1 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -40,6 +40,26 @@
40 40
41#include "cpu.h" 41#include "cpu.h"
42 42
43#ifdef CONFIG_X86_64
44
45/* all of these masks are initialized in setup_cpu_local_masks() */
46cpumask_var_t cpu_callin_mask;
47cpumask_var_t cpu_callout_mask;
48cpumask_var_t cpu_initialized_mask;
49
50/* representing cpus for which sibling maps can be computed */
51cpumask_var_t cpu_sibling_setup_mask;
52
53#else /* CONFIG_X86_32 */
54
55cpumask_t cpu_callin_map;
56cpumask_t cpu_callout_map;
57cpumask_t cpu_initialized;
58cpumask_t cpu_sibling_setup_map;
59
60#endif /* CONFIG_X86_32 */
61
62
43static struct cpu_dev *this_cpu __cpuinitdata; 63static struct cpu_dev *this_cpu __cpuinitdata;
44 64
45#ifdef CONFIG_X86_64 65#ifdef CONFIG_X86_64
@@ -856,8 +876,6 @@ static __init int setup_disablecpuid(char *arg)
856} 876}
857__setup("clearcpuid=", setup_disablecpuid); 877__setup("clearcpuid=", setup_disablecpuid);
858 878
859cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE;
860
861#ifdef CONFIG_X86_64 879#ifdef CONFIG_X86_64
862struct x8664_pda **_cpu_pda __read_mostly; 880struct x8664_pda **_cpu_pda __read_mostly;
863EXPORT_SYMBOL(_cpu_pda); 881EXPORT_SYMBOL(_cpu_pda);
@@ -976,7 +994,7 @@ void __cpuinit cpu_init(void)
976 994
977 me = current; 995 me = current;
978 996
979 if (cpu_test_and_set(cpu, cpu_initialized)) 997 if (cpumask_test_and_set_cpu(cpu, cpu_initialized_mask))
980 panic("CPU#%d already initialized!\n", cpu); 998 panic("CPU#%d already initialized!\n", cpu);
981 999
982 printk(KERN_INFO "Initializing CPU#%d\n", cpu); 1000 printk(KERN_INFO "Initializing CPU#%d\n", cpu);
@@ -1085,7 +1103,7 @@ void __cpuinit cpu_init(void)
1085 struct tss_struct *t = &per_cpu(init_tss, cpu); 1103 struct tss_struct *t = &per_cpu(init_tss, cpu);
1086 struct thread_struct *thread = &curr->thread; 1104 struct thread_struct *thread = &curr->thread;
1087 1105
1088 if (cpu_test_and_set(cpu, cpu_initialized)) { 1106 if (cpumask_test_and_set_cpu(cpu, cpu_initialized_mask)) {
1089 printk(KERN_WARNING "CPU#%d already initialized!\n", cpu); 1107 printk(KERN_WARNING "CPU#%d already initialized!\n", cpu);
1090 for (;;) local_irq_enable(); 1108 for (;;) local_irq_enable();
1091 } 1109 }