Explorar el Código

ARM: mach-ux500: 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.

Cc: Jamie Iles <jamie@jamieiles.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Barry Song hace 14 años
padre
commit
fb0225871e
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      arch/arm/mach-ux500/cpu.c

+ 1 - 1
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 */
 	/* wait for the operation to complete */
 	while (readl_relaxed(reg) & mask)
 	while (readl_relaxed(reg) & mask)
-		;
+		cpu_relax();
 }
 }
 
 
 static inline void ux500_cache_sync(void)
 static inline void ux500_cache_sync(void)