mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "Krzysztof Helt" <krzysztof.h1@poczta.fm>
Cc: "Ingo Molnar" <mingo@elte.hu>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	"Krzysztof Helt" <krzysztof.h1@wp.pl>
Subject: Re: [PATCH] x86: move mtrr cpu cap setting early in early_init_xxxx
Date: Mon, 1 Sep 2008 09:42:10 -0700	[thread overview]
Message-ID: <86802c440809010942k7b789f09t920bbe8140dfea04@mail.gmail.com> (raw)
In-Reply-To: <20080901181642.14bfb17f.krzysztof.h1@poczta.fm>

On Mon, Sep 1, 2008 at 9:16 AM, Krzysztof Helt <krzysztof.h1@poczta.fm> wrote:
> On Sun, 31 Aug 2008 21:07:05 -0700
> Yinghai Lu <yhlu.kernel@gmail.com> wrote:
>
>> Krzysztof Helt <krzysztof.h1@wp.pl> 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@wp.pl>
>> Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
>> Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
>>
>> ---
>
> 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
>
> ---
> From 808cfe180c1400594a01d6229239d4bf01ca4eea Mon Sep 17 00:00:00 2001
> From: Krzysztof Helt <krzysztof.h1@wp.pl>
> Date: Tue, 2 Sep 2008 17:29:51 +0200
> Subject: [PATCH] x86: delay early cpu initialization until cpuid is done
>
> Move early cpu initialization after cpu
> early get cap so the early cpu initialization
> can fix up cpu caps.
>
> Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
> ---
>  arch/x86/kernel/cpu/common.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
> index d3bc82f..f970cbf 100644
> --- a/arch/x86/kernel/cpu/common.c
> +++ b/arch/x86/kernel/cpu/common.c
> @@ -335,11 +335,11 @@ static void __init early_cpu_detect(void)
>
>        get_cpu_vendor(c, 1);
>
> +       early_get_cap(c);
> +
>        if (c->x86_vendor != X86_VENDOR_UNKNOWN &&
>            cpu_devs[c->x86_vendor]->c_early_init)
>                cpu_devs[c->x86_vendor]->c_early_init(c);
> -
> -       early_get_cap(c);
>  }
>
>  /*

thanks.

Ingo,
[PATCH] x86: delay early cpu initialization until cpuid is done
should be applied before
[PATCH] x86: move mtrr cpu cap setting early in early_init_xxxx

YH

  reply	other threads:[~2008-09-01 16:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-01  4:07 Yinghai Lu
2008-09-01 16:16 ` Krzysztof Helt
2008-09-01 16:42   ` Yinghai Lu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-09-01  4:06 Yinghai Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86802c440809010942k7b789f09t920bbe8140dfea04@mail.gmail.com \
    --to=yhlu.kernel@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=krzysztof.h1@poczta.fm \
    --cc=krzysztof.h1@wp.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®