* [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 related [flat|nested] 3+ messages in thread
* [tip:x86/mrst] x86: Avoid check hlt for newer cpus
2010-05-07 21:59 [PATCH] x86: avoid check hlt for newer cpus Jacob Pan
@ 2010-05-07 22:18 ` tip-bot for Jacob Pan
2010-05-07 22:36 ` tip-bot for Jacob Pan
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Jacob Pan @ 2010-05-07 22:18 UTC (permalink / raw
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx, jacob.jun.pan
Commit-ID: d081dd5fe0ed8449433b972d3080f9d776e9424b
Gitweb: http://git.kernel.org/tip/d081dd5fe0ed8449433b972d3080f9d776e9424b
Author: Jacob Pan <jacob.jun.pan@linux.intel.com>
AuthorDate: Fri, 7 May 2010 14:59:45 -0700
Committer: H. Peter Anvin <hpa@zytor.com>
CommitDate: Fri, 7 May 2010 15:15:47 -0700
x86: Avoid check hlt for newer cpus
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).
[ hpa: corrected family > 5 to family >= 5 ]
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
LKML-Reference: <1273269585-14346-1-git-send-email-jacob.jun.pan@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.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..38f20e8 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 (boot_cpu_data >= 5 || paravirt_enabled())
return;
printk(KERN_INFO "Checking 'hlt' instruction... ");
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [tip:x86/mrst] x86: Avoid check hlt for newer cpus
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
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Jacob Pan @ 2010-05-07 22:36 UTC (permalink / raw
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx, jacob.jun.pan
Commit-ID: 2b107d93635616db0c3f893c8cc2e6d5cd8d77b2
Gitweb: http://git.kernel.org/tip/2b107d93635616db0c3f893c8cc2e6d5cd8d77b2
Author: Jacob Pan <jacob.jun.pan@linux.intel.com>
AuthorDate: Fri, 7 May 2010 14:59:45 -0700
Committer: H. Peter Anvin <hpa@zytor.com>
CommitDate: Fri, 7 May 2010 15:31:17 -0700
x86: Avoid check hlt for newer cpus
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).
[ hpa: corrected family > 5 to family >= 5 ]
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
LKML-Reference: <1273269585-14346-1-git-send-email-jacob.jun.pan@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.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..c39576c 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 (boot_cpu_data.x86 >= 5 || paravirt_enabled())
return;
printk(KERN_INFO "Checking 'hlt' instruction... ");
^ permalink raw reply related [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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).