Re: [PATCH] x86: move mtrr cpu cap setting early in early_init_xxxx

From: Krzysztof Helt
Date: Mon Sep 01 2008 - 12:10:24 EST


On Sun, 31 Aug 2008 21:07:05 -0700
Yinghai Lu <yhlu.kernel@xxxxxxxxx> wrote:

> Krzysztof Helt <krzysztof.h1@xxxxx> found mtrr is not detected on k6-2
>
> root case:
> we move mtrr_bp_init early for mtrr trimming.
> and in early_detect, only read cap from cpuid, so some cpu doesn't have
> that bit in cpuid and need to set workaround bit will have problem.
>
> need to add early_init_xxxx to preset those bit before mtrr_bp_init
> for those earlier cpus.
>
> this patch is for 2.6.27
>
> Reported-by: Krzysztof Helt <krzysztof.h1@xxxxx>
> Signed-off-by: Yinghai Lu <yhlu.kernel@xxxxxxxxx>
> Cc: Krzysztof Helt <krzysztof.h1@xxxxx>
>
> ---

Your patch works only if the the fix below is applied.

Otherwise, the caps set in the early_cpu_init are reset
in the early_get_cap.

Regards,
Krzysztof

---