Skip to content

Commit

Permalink
sh: smp: shove a cpu_relax() in the plat_start_cpu() busy loop.
Browse files Browse the repository at this point in the history
Without this, certain versions of GCC will happily optimize the entire
loop out.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Sep 8, 2008
1 parent 8c24594 commit 71f0bdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sh/kernel/cpu/sh4a/smp-shx3.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void plat_start_cpu(unsigned int cpu, unsigned long entry_point)
ctrl_outl(STBCR_MSTP, STBCR_REG(cpu));

while (!(ctrl_inl(STBCR_REG(cpu)) & STBCR_MSTP))
;
cpu_relax();

/* Start up secondary processor by sending a reset */
ctrl_outl(STBCR_AP_VAL, STBCR_REG(cpu));
Expand Down

0 comments on commit 71f0bdc

Please sign in to comment.