Add cpu_relax in idle spin loop for no-hlt kernel option
PATCH 1/1 Add cpu_relax in idle spin loop for no-hlt kernel option
If given no-hlt kernel option, ia32 idle loop turns out to be a spin loop. Add cpu_relax() in this spin loop because IA32 SDM recommends that a PAUSE instruction be put in all spin loops.
The patch is against 2.6.9 kernel.
Signed-off-by Fenghua Yu <[email protected]>
arch/i386/kernel/process.c +2 -0
@@ -97,6 +97,8 @@ void default_idle(void)else local_irq_enable (); } +else +cpu_relax (); }/*