All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: L2X0: add explicit cpu_relax() for busy wait loop
@ 2011-08-24  1:30 Barry Song
  2011-08-24 14:35 ` Arnd Bergmann
  2011-08-24 14:44 ` Jamie Iles
  0 siblings, 2 replies; 3+ messages in thread
From: Barry Song @ 2011-08-24  1:30 UTC (permalink / raw)
  To: linux-arm-kernel

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/mm/cache-l2x0.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 2ebbc7c..966b3bd 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
-- 
1.7.1



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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 1/2] ARM: L2X0: add explicit cpu_relax() for busy wait loop
  2011-08-24  1:30 [PATCH 1/2] ARM: L2X0: add explicit cpu_relax() for busy wait loop Barry Song
@ 2011-08-24 14:35 ` Arnd Bergmann
  2011-08-24 14:44 ` Jamie Iles
  1 sibling, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2011-08-24 14:35 UTC (permalink / raw)
  To: linux-arm-kernel

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] ARM: L2X0: add explicit cpu_relax() for busy wait loop
  2011-08-24  1:30 [PATCH 1/2] ARM: L2X0: add explicit cpu_relax() for busy wait loop Barry Song
  2011-08-24 14:35 ` Arnd Bergmann
@ 2011-08-24 14:44 ` Jamie Iles
  1 sibling, 0 replies; 3+ messages in thread
From: Jamie Iles @ 2011-08-24 14:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Barry,

On Tue, Aug 23, 2011 at 06:30:11PM -0700, 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>

Reviewed-by: Jamie Iles <jamie@jamieiles.com>

for both patches!

Jamie

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-24 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-24  1:30 [PATCH 1/2] ARM: L2X0: add explicit cpu_relax() for busy wait loop Barry Song
2011-08-24 14:35 ` Arnd Bergmann
2011-08-24 14:44 ` Jamie Iles

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.