From: Paul Mundt Date: Wed, 6 Aug 2008 09:39:32 +0000 (+0900) Subject: sh: smp: shove a cpu_relax() in the plat_start_cpu() busy loop. X-Git-Tag: v2.6.28-rc1~99^2~93 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=71f0bdcab69ab36b1e939d36063aaf6c4a164ed3;p=linux-2.6-omap-h63xx.git sh: smp: shove a cpu_relax() in the plat_start_cpu() busy loop. Without this, certain versions of GCC will happily optimize the entire loop out. Signed-off-by: Paul Mundt --- diff --git a/arch/sh/kernel/cpu/sh4a/smp-shx3.c b/arch/sh/kernel/cpu/sh4a/smp-shx3.c index edb4da037e0..b8869aa20de 100644 --- a/arch/sh/kernel/cpu/sh4a/smp-shx3.c +++ b/arch/sh/kernel/cpu/sh4a/smp-shx3.c @@ -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));