Commit 2ee0a429 authored by Chris Dearman's avatar Chris Dearman Committed by Ralf Baechle

MIPS: CMP: Fix memory barriers for correct operation of amon_cpu_start

Signed-off-by: Chris Dearman (chris@mips.com)
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent cea2be44
...@@ -70,11 +70,12 @@ void amon_cpu_start(int cpu, ...@@ -70,11 +70,12 @@ void amon_cpu_start(int cpu,
launch->sp = sp; launch->sp = sp;
launch->a0 = a0; launch->a0 = a0;
/* Make sure target sees parameters before the go bit */ smp_wmb(); /* Target must see parameters before go */
smp_mb();
launch->flags |= LAUNCH_FGO; launch->flags |= LAUNCH_FGO;
smp_wmb(); /* Target must see go before we poll */
while ((launch->flags & LAUNCH_FGONE) == 0) while ((launch->flags & LAUNCH_FGONE) == 0)
; ;
smp_rmb(); /* Target will be updating flags soon */
pr_debug("launch: cpu%d gone!\n", cpu); pr_debug("launch: cpu%d gone!\n", cpu);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment