Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6db44df authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar
Browse files

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: default avatarYinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent b38b0665
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -241,9 +241,9 @@ static void __cpuinit filter_cpuid_features(struct cpuinfo_x86 *c, bool warn)
		 * signs here...
		 * signs here...
		 */
		 */
		if (cpu_has(c, df->feature) &&
		if (cpu_has(c, df->feature) &&
		    ((s32)df->feature < 0 ?
		    ((s32)df->level < 0 ?
		     (u32)df->feature > (u32)c->extended_cpuid_level :
		     (u32)df->level > (u32)c->extended_cpuid_level :
		     (s32)df->feature > (s32)c->cpuid_level)) {
		     (s32)df->level > (s32)c->cpuid_level)) {
			clear_cpu_cap(c, df->feature);
			clear_cpu_cap(c, df->feature);
			if (warn)
			if (warn)
				printk(KERN_WARNING
				printk(KERN_WARNING