aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/common.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-02-15 02:59:18 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-15 03:03:29 -0500
commitf6db44df5bd39ed33883786d35342759af796e4a (patch)
tree1ca60ed13539b7a795d987b44fe2bf12ca423685 /arch/x86/kernel/cpu/common.c
parentb38b0665905538e76e26f2a4c686179abb1f69f6 (diff)
x86: fix typo in filter_cpuid_features()
Impact: fix wrong disabling of cpu features an amd system got this strange output: CPU: CPU feature monitor disabled due to lack of CPUID level 0x5 but in /proc/cpuinfo I 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 i have: cpuid level : 11 Tt turns out there is a typo, and we should use level member in df. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
-rw-r--r--arch/x86/kernel/cpu/common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 21f086b4c1a8..32093d08d872 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -241,9 +241,9 @@ static void __cpuinit filter_cpuid_features(struct cpuinfo_x86 *c, bool warn)
241 * signs here... 241 * signs here...
242 */ 242 */
243 if (cpu_has(c, df->feature) && 243 if (cpu_has(c, df->feature) &&
244 ((s32)df->feature < 0 ? 244 ((s32)df->level < 0 ?
245 (u32)df->feature > (u32)c->extended_cpuid_level : 245 (u32)df->level > (u32)c->extended_cpuid_level :
246 (s32)df->feature > (s32)c->cpuid_level)) { 246 (s32)df->level > (s32)c->cpuid_level)) {
247 clear_cpu_cap(c, df->feature); 247 clear_cpu_cap(c, df->feature);
248 if (warn) 248 if (warn)
249 printk(KERN_WARNING 249 printk(KERN_WARNING
@@ -253,7 +253,7 @@ static void __cpuinit filter_cpuid_features(struct cpuinfo_x86 *c, bool warn)
253 df->level); 253 df->level);
254 } 254 }
255 } 255 }
256} 256}
257 257
258/* 258/*
259 * Naming convention should be: <Name> [(<Codename>)] 259 * Naming convention should be: <Name> [(<Codename>)]