From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "Krzysztof Helt" <krzysztof.h1@wp.pl>
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de,
mingo@redhat.com
Subject: Re: [PATCH] x86: better CPU identification without the CPUID
Date: Sat, 13 Sep 2008 21:43:59 -0700 [thread overview]
Message-ID: <86802c440809132143p287edb82i6a73efbc53e6e93f@mail.gmail.com> (raw)
In-Reply-To: <20080913125606.d655bdcf.krzysztof.h1@wp.pl>
On Sat, Sep 13, 2008 at 3:56 AM, Krzysztof Helt <krzysztof.h1@wp.pl> wrote:
> From: Krzysztof Helt <krzysztof.h1@wp.pl>
>
> cpus without the CPUID instruction are identified
> as general 386 or 486 while some cpus (mostly made
> by Cyrix) provide c_identify function which identify
> correctly older cpus using cpu specific registers).
>
> Cyrix cpus are even worse as 5x86 and 6x68 have
> the CPUID instruction disabled. The CPUID is
> enabled by the c_identify() but the c_identify
> is only called when the CPUID is available.
>
> Fix this by calling the c_identify() for all known
> cpu families if there is no the CPUID instruction
>
> Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
> ---
>
> I have tested it on Cyrix Cx486DX2 cpu.
>
> I suspect that coma_bug field and mtrr support is not
> set correctly for the Cyrix 6x86 family. I have not a cpu from
> the Cyrix 6x68 family to test.
>
> The code path is (+ where the patch code is added)
>
> if (have_cpuid_p()) {
>
> }
> + } else {
> ...
> + }
>
> so it does not affect cpus with the CPUID instruction.
>
> Regards,
> Krzysztof
>
> diff -urp linux-mm/arch/x86/kernel/cpu/common.c linux-486/arch/x86/kernel/cpu/common.c
> --- linux-mm/arch/x86/kernel/cpu/common.c 2008-09-05 23:38:20.295563396 +0200
> +++ linux-486/arch/x86/kernel/cpu/common.c 2008-09-12 22:53:27.062265329 +0200
> @@ -444,6 +444,17 @@ static void __cpuinit generic_identify(s
>
> init_scattered_cpuid_features(c);
> detect_nopl(c);
> + } else {
> + int i;
> + for (i = 0; i < X86_VENDOR_NUM; i++)
> + if (cpu_devs[i] && cpu_devs[i]->c_identify) {
> + c->x86_vendor_id[0] = 0;
> + cpu_devs[i]->c_identify(c);
> + if (c->x86_vendor_id[0]) {
> + get_cpu_vendor(c, 0);
> + break;
> + }
> + }
> }
> }
>
> --
1. can you check tip/master?
2. please check if you can add code in early_identify_cpu
3. need to move c_identify_cpu calling to identify_cpu
YH
next prev parent reply other threads:[~2008-09-14 4:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-13 10:56 Krzysztof Helt
2008-09-14 4:43 ` Yinghai Lu [this message]
2008-09-14 5:55 ` Yinghai Lu
2008-09-14 8:30 ` Krzysztof Helt
2008-09-14 9:01 ` Yinghai Lu
2008-09-14 9:16 ` 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=86802c440809132143p287edb82i6a73efbc53e6e93f@mail.gmail.com \
--to=yhlu.kernel@gmail.com \
--cc=hpa@zytor.com \
--cc=krzysztof.h1@wp.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--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®