Skip to contentSkip to conversation

cpu model calculation for family 6 cpu

PATCH New Shaohua Li 1 participant 1 message Mar 7, 2006

lore
Share & tools
lore

Shaohua Li

author
#0 lore raw

PATCH 1/1 cpu model calculation for family 6 cpu

The x86_model calculation also applies for family 6. early_cpu_detect does the right thing, but generic_identify misses.

---

 linux-2.6.16-rc5-root/arch/i386/kernel/cpu/common.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/i386/kernel/cpu/common.c renamed from arch/i386/kernel/cpu/common.c~cpu_model +2 -2
diff -puN arch/i386/kernel/cpu/common.c~cpu_model arch/i386/kernel/cpu/common.c
@@ -278,10 +278,10 @@ void __devinit generic_identify(struct c
 			c->x86_capability[4] = excap;
 			c->x86 = (tfms >> 8) & 15;
 			c->x86_model = (tfms >> 4) & 15;
-			if (c->x86 == 0xf) {
+			if (c->x86 == 0xf)
 				c->x86 += (tfms >> 20) & 0xff;
+			if (c->x86 >= 0x6)
 				c->x86_model += ((tfms >> 16) & 0xF) << 4;
-			} 
 			c->x86_mask = tfms & 15;
 		} else {
 			/* Have CPUID level 0 only - unheard of */

_