mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86: avoid check hlt for newer cpus
@ 2010-05-07 21:59 Jacob Pan
  2010-05-07 22:18 ` [tip:x86/mrst] x86: Avoid " tip-bot for Jacob Pan
  2010-05-07 22:36 ` tip-bot for Jacob Pan
  0 siblings, 2 replies; 3+ messages in thread
From: Jacob Pan @ 2010-05-07 21:59 UTC (permalink / raw)
  To: LKML, H. Peter Anvin, Ingo Molnar, Thomas Gleixner,
	Arjan van de Ven, Alek Du
  Cc: Jacob Pan

Check hlt instruction was targeted for some older CPUs. It is an expensive
operation in that it takes 4 ticks to break out the check.  We can avoid
such check completely for newer x86 cpus ( family > 5).
http://lkml.org/lkml/2010/5/7/395

Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
---
 arch/x86/kernel/cpu/bugs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 01a2652..36d9bcf 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -86,7 +86,7 @@ static void __init check_fpu(void)
 
 static void __init check_hlt(void)
 {
-	if (paravirt_enabled())
+	if (paravirt_enabled() || boot_cpu_data.x86 > 5)
 		return;
 
 	printk(KERN_INFO "Checking 'hlt' instruction... ");
-- 
1.6.3.3


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

end of thread, other threads:[~2010-05-07 22:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-07 21:59 [PATCH] x86: avoid check hlt for newer cpus Jacob Pan
2010-05-07 22:18 ` [tip:x86/mrst] x86: Avoid " tip-bot for Jacob Pan
2010-05-07 22:36 ` tip-bot for Jacob Pan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome