diff options
Diffstat (limited to 'arch/sparc64/kernel/smp.c')
-rw-r--r-- | arch/sparc64/kernel/smp.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 743ccad61c60..2be166c544ca 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -80,8 +80,6 @@ void smp_bogo(struct seq_file *m) | |||
80 | i, cpu_data(i).clock_tick); | 80 | i, cpu_data(i).clock_tick); |
81 | } | 81 | } |
82 | 82 | ||
83 | static __cacheline_aligned_in_smp DEFINE_SPINLOCK(call_lock); | ||
84 | |||
85 | extern void setup_sparc64_timer(void); | 83 | extern void setup_sparc64_timer(void); |
86 | 84 | ||
87 | static volatile unsigned long callin_flag = 0; | 85 | static volatile unsigned long callin_flag = 0; |
@@ -120,9 +118,9 @@ void __cpuinit smp_callin(void) | |||
120 | while (!cpu_isset(cpuid, smp_commenced_mask)) | 118 | while (!cpu_isset(cpuid, smp_commenced_mask)) |
121 | rmb(); | 119 | rmb(); |
122 | 120 | ||
123 | spin_lock(&call_lock); | 121 | ipi_call_lock(); |
124 | cpu_set(cpuid, cpu_online_map); | 122 | cpu_set(cpuid, cpu_online_map); |
125 | spin_unlock(&call_lock); | 123 | ipi_call_unlock(); |
126 | 124 | ||
127 | /* idle thread is expected to have preempt disabled */ | 125 | /* idle thread is expected to have preempt disabled */ |
128 | preempt_disable(); | 126 | preempt_disable(); |
@@ -1305,10 +1303,6 @@ int __cpu_disable(void) | |||
1305 | c->core_id = 0; | 1303 | c->core_id = 0; |
1306 | c->proc_id = -1; | 1304 | c->proc_id = -1; |
1307 | 1305 | ||
1308 | spin_lock(&call_lock); | ||
1309 | cpu_clear(cpu, cpu_online_map); | ||
1310 | spin_unlock(&call_lock); | ||
1311 | |||
1312 | smp_wmb(); | 1306 | smp_wmb(); |
1313 | 1307 | ||
1314 | /* Make sure no interrupts point to this cpu. */ | 1308 | /* Make sure no interrupts point to this cpu. */ |
@@ -1318,6 +1312,10 @@ int __cpu_disable(void) | |||
1318 | mdelay(1); | 1312 | mdelay(1); |
1319 | local_irq_disable(); | 1313 | local_irq_disable(); |
1320 | 1314 | ||
1315 | ipi_call_lock(); | ||
1316 | cpu_clear(cpu, cpu_online_map); | ||
1317 | ipi_call_unlock(); | ||
1318 | |||
1321 | return 0; | 1319 | return 0; |
1322 | } | 1320 | } |
1323 | 1321 | ||