public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: fix typo in filter_cpuid_features()
@ 2009-02-15  7:59 Yinghai Lu
  2009-02-15  8:03 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Yinghai Lu @ 2009-02-15  7:59 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Andrew Morton
  Cc: linux-kernel@vger.kernel.org


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

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 arch/x86/kernel/cpu/common.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: linux-2.6/arch/x86/kernel/cpu/common.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/common.c
+++ linux-2.6/arch/x86/kernel/cpu/common.c
@@ -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>)]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86: fix typo in filter_cpuid_features()
  2009-02-15  7:59 [PATCH] x86: fix typo in filter_cpuid_features() Yinghai Lu
@ 2009-02-15  8:03 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2009-02-15  8:03 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: Thomas Gleixner, H. Peter Anvin, Andrew Morton,
	linux-kernel@vger.kernel.org


* Yinghai Lu <yinghai@kernel.org> wrote:

> 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
> 
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> 
> ---
>  arch/x86/kernel/cpu/common.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Applied to tip:x86/cpudetect, thanks Yinghai!

	Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-15  8:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-15  7:59 [PATCH] x86: fix typo in filter_cpuid_features() Yinghai Lu
2009-02-15  8:03 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox