Commit c92ac81e authored by Fenghua Yu's avatar Fenghua Yu Committed by Linus Torvalds

[PATCH] 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.
Signed-off-by: default avatarFenghua Yu <fenghua.yu@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 78aee79d
......@@ -99,6 +99,8 @@ void default_idle(void)
safe_halt();
else
local_irq_enable();
} else {
cpu_relax();
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment