lkml.org 
[lkml]   [2008]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: pat cpu feature bit setting for known cpus
On Mon, 24 Mar 2008, Yinghai Lu wrote:

> [PATCH] x86: pat cpu feature bit setting for known cpus
>
> Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
>
> diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
> index eb94460..b186047 100644
> --- a/arch/x86/kernel/cpu/common.c
> +++ b/arch/x86/kernel/cpu/common.c
> @@ -309,6 +309,19 @@ static void __cpuinit early_get_cap(struct cpuinfo_x86 *c)
>
> }
>
> + clear_cpu_cap(c, X86_FEATURE_PAT);
> +
> + switch (c->x86_vendor) {
> + case X86_VENDOR_AMD:
> + if (c->x86 >= 0xf && c->x86 <= 0x11)
> + set_cpu_cap(c, X86_FEATURE_PAT);

just a general comment on things like this... "x->x86 <= 0x11" ensures
this file will have to be updated every time a new AMD CPU is released.


> + break;
> + case X86_VENDOR_INTEL:
> + if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15))

note that you didn't limit intel the same way... at least for the numerous
core2 processor models.

-dean


\
 
 \ /
  Last update: 2008-03-30 13:45    [W:0.108 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site