x86: fix typo in filter_cpuid_features()
PATCH 1/1 x86: fix typo in filter_cpuid_features()
Impact: fix wrong diabling cpu features
on amd system got strange:
CPU: CPU feature monitor disabled due to lack of CPUID level 0x5 but in /proc/cpuinfo do have
cpuid level : 5
on intel system:
CPU: CPU feature monitor disabled due to lack of CPUID level 0x5
CPU: CPU feature dca disabled due to lack of CPUID level 0x9 but in /proc/cpuinfo do have
cpuid level : 11
it turns out there is one typo, and should use level member in df
--- arch/x86/kernel/cpu/common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/x86/kernel/cpu/common.c +4 -4
@@ -255,9 +255,9 @@ static void __cpuinit filter_cpuid_featu* signs here... */ if (cpu_has (c, df->feature) && - ((s32 )df->feature <0 ? - (u32 )df->feature > (u32 )c->extended_cpuid_level : - (s32 )df->feature > (s32 )c->cpuid_level)) { + ((s32 )df->level <0 ? + (u32 )df->level > (u32 )c->extended_cpuid_level : + (s32 )df->level > (s32 )c->cpuid_level)) {clear_cpu_cap (c, df->feature);if (warn) printk(KERN_WARNING
@@ -267,7 +267,7 @@ static void __cpuinit filter_cpuid_featu df->level); } } -} +}/* * Naming convention should be: <Name> [(<Codename>)]
Ingo Molnar
AppliedQuoted 13 lines · Yinghai Lu
Impact: fix wrong diabling cpu features
on amd system got strange:
CPU: CPU feature monitor disabled due to lack of CPUID level0x5but in/proc/cpuinfodo have
cpuid level : 5on intel system:
CPU: CPU feature monitor disabled due to lack of CPUID level0x5
CPU: CPU feature dca disabled due to lack of CPUID level0x9but in/proc/cpuinfodo have
cpuid level : 11
Quoted 7 lines
it turns out there is one typo, and should use level member in df
Signed-off-by Yinghai Lu <[email protected]>--- arch/x86/kernel/cpu/common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Applied to tip:x86/cpudetect, thanks Yinghai!
Ingo