[Patch] x86, x86_64: fix cpu model for family 0x6

From: Siddha, Suresh B (suresh.b.siddha_at_intel.com)
Date: 09/30/05

  • Next message: Mark Knecht: "l2.6.14-rc2-rt7 - build problems - mce?"
    Date:	Thu, 29 Sep 2005 19:04:20 -0700
    To: linux-kernel@vger.kernel.org
    
    

    Andi, please pickup this patch and push to Andrew/Linus.

    thanks,
    suresh

    --
    According to cpuid instruction in IA32 SDM-Vol2, when computing cpu model,
    we need to consider extended model ID for family 0x6 also.
    Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
    --- linux-2.6.14-rc2-git7/arch/i386/kernel/cpu/common.c~	2005-09-29 17:44:12.030688920 -0700
    +++ linux-2.6.14-rc2-git7/arch/i386/kernel/cpu/common.c	2005-09-29 17:44:30.967810040 -0700
    @@ -233,10 +233,10 @@ static void __init early_cpu_detect(void
     		cpuid(0x00000001, &tfms, &misc, &junk, &cap0);
     		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 == 0xf)
     			c->x86_model += ((tfms >> 16) & 0xF) << 4;
    -		}
     		c->x86_mask = tfms & 15;
     		if (cap0 & (1<<19))
     			c->x86_cache_alignment = ((misc >> 8) & 0xff) * 8;
    --- linux-2.6.14-rc2-git7/arch/x86_64/kernel/setup.c~	2005-09-29 18:05:26.503939536 -0700
    +++ linux-2.6.14-rc2-git7/arch/x86_64/kernel/setup.c	2005-09-29 18:06:42.318413984 -0700
    @@ -1059,10 +1059,10 @@ void __cpuinit early_identify_cpu(struct
     		c->x86 = (tfms >> 8) & 0xf;
     		c->x86_model = (tfms >> 4) & 0xf;
     		c->x86_mask = tfms & 0xf;
    -		if (c->x86 == 0xf) {
    +		if (c->x86 == 0xf)
     			c->x86 += (tfms >> 20) & 0xff;
    +		if (c->x86 == 0x6 || c->x86 == 0xf)
     			c->x86_model += ((tfms >> 16) & 0xF) << 4;
    -		} 
     		if (c->x86_capability[0] & (1<<19)) 
     			c->x86_clflush_size = ((misc >> 8) & 0xff) * 8;
     	} else {
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Mark Knecht: "l2.6.14-rc2-rt7 - build problems - mce?"