summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorJacob Pan <jacob.jun.pan@linux.intel.com>2010-05-07 23:59:45 +0200
committerH. Peter Anvin <hpa@zytor.com>2010-05-08 00:31:17 +0200
commit2b107d93635616db0c3f893c8cc2e6d5cd8d77b2 (patch)
treec0398294e48d974887552de739b8e0bdd343b794 /arch/x86
parentMerge branch 'zerolen' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarz... (diff)
downloadlinux-2b107d93635616db0c3f893c8cc2e6d5cd8d77b2.tar.xz
linux-2b107d93635616db0c3f893c8cc2e6d5cd8d77b2.zip
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>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/cpu/bugs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 01a265212395..c39576cb3018 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... ");