diff mbox

[2/2] ARM: mach-ux500: add explicit cpu_relax() for busy wait loop

Message ID 1314149486-5105-1-git-send-email-Baohua.Song@csr.com (mailing list archive)
State New, archived
Headers show

Commit Message

Barry Song Aug. 24, 2011, 1:31 a.m. UTC
using cpu_relax in busy loops is a well-known idiom in the kernel. It's more
for documentation purposes than technically needed here.

Cc: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
---
 arch/arm/mach-ux500/cpu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Barry Song Aug. 24, 2011, 7:43 a.m. UTC | #1
> > using cpu_relax in busy loops is a well-known idiom in the kernel. It's more
> > for documentation purposes than technically needed here.
> >
> > Cc: Jamie Iles <jamie@jamieiles.com>
> > Signed-off-by: Barry Song <Baohua.Song@csr.com>
> 
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> 
> Do you want me to push this to the ux500 tree or will
> you feed it in some other way?


Linus, better push it to ux500 and Arnd pull your ux500.

> 
> Thanks!
> Linus Walleij

-barry


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
Linus Walleij Aug. 24, 2011, 7:47 a.m. UTC | #2
On Wed, Aug 24, 2011 at 9:43 AM, Barry Song <Baohua.Song@csr.com> wrote:

> Linus, better push it to ux500 and Arnd pull your ux500.

OK I have it in ux500-core, i'll take care of it.

Linus Walleij
Arnd Bergmann Aug. 24, 2011, 2:36 p.m. UTC | #3
On Wednesday 24 August 2011, Barry Song wrote:
> using cpu_relax in busy loops is a well-known idiom in the kernel. It's more
> for documentation purposes than technically needed here.
> 
> Cc: Jamie Iles <jamie@jamieiles.com>
> Signed-off-by: Barry Song <Baohua.Song@csr.com>

Acked-by: Arnd Bergmann <arnd@arndb.de>
diff mbox

Patch

diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c
index 1da23bb..76ee355 100644
--- a/arch/arm/mach-ux500/cpu.c
+++ b/arch/arm/mach-ux500/cpu.c
@@ -62,7 +62,7 @@  static inline void ux500_cache_wait(void __iomem *reg, unsigned long mask)
 {
 	/* wait for the operation to complete */
 	while (readl_relaxed(reg) & mask)
-		;
+		cpu_relax();
 }
 
 static inline void ux500_cache_sync(void)