aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/smp.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2005-05-01 11:58:47 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 11:58:47 -0400
commit0d8d4d42f2d00eb65262b49f4edd4cf7ef4eb6fc (patch)
tree56fdbffa1f3eddc68b56a1148fb372b296fc09da /arch/ppc64/kernel/smp.c
parenteeb24de431ac8c80fd13a2c479cd0eb51b70484e (diff)
[PATCH] ppc64: use smp_mb and smp_wmb
Use smp_mb and smp_wmb. In particular smp_wmb is lighter weight than wmb. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc64/kernel/smp.c')
-rw-r--r--arch/ppc64/kernel/smp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c
index 1c92da3e4525..3b906cd94037 100644
--- a/arch/ppc64/kernel/smp.c
+++ b/arch/ppc64/kernel/smp.c
@@ -125,7 +125,7 @@ void __devinit smp_generic_kick_cpu(int nr)
125 * the processor will continue on to secondary_start 125 * the processor will continue on to secondary_start
126 */ 126 */
127 paca[nr].cpu_start = 1; 127 paca[nr].cpu_start = 1;
128 mb(); 128 smp_mb();
129} 129}
130 130
131#endif /* CONFIG_PPC_MULTIPLATFORM */ 131#endif /* CONFIG_PPC_MULTIPLATFORM */
@@ -256,7 +256,7 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
256 } 256 }
257 257
258 call_data = &data; 258 call_data = &data;
259 wmb(); 259 smp_wmb();
260 /* Send a message to all other CPUs and wait for them to respond */ 260 /* Send a message to all other CPUs and wait for them to respond */
261 smp_ops->message_pass(MSG_ALL_BUT_SELF, PPC_MSG_CALL_FUNCTION); 261 smp_ops->message_pass(MSG_ALL_BUT_SELF, PPC_MSG_CALL_FUNCTION);
262 262
@@ -431,7 +431,7 @@ int generic_cpu_enable(unsigned int cpu)
431 431
432 /* get the target out of it's holding state */ 432 /* get the target out of it's holding state */
433 per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; 433 per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;
434 wmb(); 434 smp_wmb();
435 435
436 while (!cpu_online(cpu)) 436 while (!cpu_online(cpu))
437 cpu_relax(); 437 cpu_relax();
@@ -447,7 +447,7 @@ void generic_cpu_die(unsigned int cpu)
447 int i; 447 int i;
448 448
449 for (i = 0; i < 100; i++) { 449 for (i = 0; i < 100; i++) {
450 rmb(); 450 smp_rmb();
451 if (per_cpu(cpu_state, cpu) == CPU_DEAD) 451 if (per_cpu(cpu_state, cpu) == CPU_DEAD)
452 return; 452 return;
453 msleep(100); 453 msleep(100);
@@ -463,7 +463,7 @@ void generic_mach_cpu_die(void)
463 cpu = smp_processor_id(); 463 cpu = smp_processor_id();
464 printk(KERN_DEBUG "CPU%d offline\n", cpu); 464 printk(KERN_DEBUG "CPU%d offline\n", cpu);
465 __get_cpu_var(cpu_state) = CPU_DEAD; 465 __get_cpu_var(cpu_state) = CPU_DEAD;
466 wmb(); 466 smp_wmb();
467 while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) 467 while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE)
468 cpu_relax(); 468 cpu_relax();
469 469
@@ -515,7 +515,7 @@ int __devinit __cpu_up(unsigned int cpu)
515 * be written out to main store before we release 515 * be written out to main store before we release
516 * the processor. 516 * the processor.
517 */ 517 */
518 mb(); 518 smp_mb();
519 519
520 /* wake up cpus */ 520 /* wake up cpus */
521 DBG("smp: kicking cpu %d\n", cpu); 521 DBG("smp: kicking cpu %d\n", cpu);