Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <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>

authored by

Barry Song and committed by
Russell King
1caf3092 8c369264

+1 -1
+1 -1
arch/arm/mm/cache-l2x0.c
··· 37 37 { 38 38 /* wait for cache operation by line or way to complete */ 39 39 while (readl_relaxed(reg) & mask) 40 - ; 40 + cpu_relax(); 41 41 } 42 42 43 43 #ifdef CONFIG_CACHE_PL310