Messages in this thread |  | | | Date | Sun, 30 Mar 2008 04:43:26 -0700 (PDT) | | From | dean gaudet <> | | Subject | Re: [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
|  |