]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
ARM: 7089/1: L2X0: add explicit cpu_relax() for busy wait loop
authorBarry Song <21cnbao@gmail.com>
Fri, 9 Sep 2011 09:30:34 +0000 (10:30 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 17 Oct 2011 08:11:36 +0000 (09:11 +0100)
using cpu_relax in busy loops is a well-known idiom in the kernel.
It's more for documentation purposes than technically needed here.

Signed-off-by: Barry Song <Baohua.Song@csr.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/cache-l2x0.c

index db4484f5bf9844f87931ad6c0e7adc8c339d0e4b..a78044885ed5ee6b042944e8c66345d2f9b45bd1 100644 (file)
@@ -37,7 +37,7 @@ static inline void cache_wait_way(void __iomem *reg, unsigned long mask)
 {
        /* wait for cache operation by line or way to complete */
        while (readl_relaxed(reg) & mask)
-               ;
+               cpu_relax();
 }
 
 #ifdef CONFIG_CACHE_PL310