From: Barry Song <21cnbao@gmail.com> Date: Fri, 9 Sep 2011 09:30:34 +0000 (+0100) Subject: ARM: 7089/1: L2X0: add explicit cpu_relax() for busy wait loop X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=1caf30924f71ae16a26aa59b02a6401f467bf1c8;p=~shefty%2Frdma-dev.git ARM: 7089/1: L2X0: add explicit cpu_relax() for busy wait loop 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 Acked-by: Arnd Bergmann Reviewed-by: Jamie Iles Signed-off-by: Russell King --- diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index db4484f5bf9..a78044885ed 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c @@ -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