[PATCH] arch/arm/kernel: use cpu_relax() in halt loops

Jonathan Neuschäfer j.neuschaefer at gmx.net
Tue Dec 14 18:00:01 EST 2010


On Tue, Dec 14, 2010 at 10:51:26PM +0000, Russell King - ARM Linux wrote:
> On Tue, Dec 14, 2010 at 11:48:48PM +0100, Jonathan Neuschäfer wrote:
> > Looking throught arch/arm/kernel/ I found some halt loops.
> > I just thought we could save some power here using cpu_relax(),
> > or am I missing something?
> 
> #if __LINUX_ARM_ARCH__ == 6
> #define cpu_relax()                     smp_mb()
> #else
> #define cpu_relax()                     barrier()
> #endif
> 
> IOW, it's either a memory barrier or compiler barrier on ARM; it
> doesn't do any power saving.

Okay, thanks for that explanation.



More information about the linux-arm-kernel mailing list