From: Rene Herman <rene.herman@keyaccess.nl>
To: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.26, PAT and AMD family 6
Date: Wed, 07 May 2008 15:00:18 +0200 [thread overview]
Message-ID: <4821A7E2.6080101@keyaccess.nl> (raw)
In-Reply-To: <86802c440805061939q39ff5500h3c9e229ecbc6b2e6@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2764 bytes --]
On 07-05-08 04:39, Yinghai Lu wrote:
> On Tue, May 6, 2008 at 6:48 PM, Rene Herman <rene.herman@keyaccess.nl> wrote:
>> On 2.6.25 and below, my /proc/cpuinfo looks like:
>>
>> processor : 0
>> vendor_id : AuthenticAMD
>> cpu family : 6
>> model : 7
>> model name : AMD Duron(tm) Processor
[ ... ]
>> flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov
>> pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow ts
>> while on current mainline PAT and TS (Temperature Sensor) drop from the
>> feature flags:
>>
>> flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov
>> pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
>>
>> With respect to PAT, I guess it's 9307cacad0dfe3749f00303125c6f7f0523e5616,
>> "x86: pat cpu feature bit setting for known cpus" but what's this about?
>>
>> Did my cpuinfo lie upto this point or shouldn't the flag be cleared? The
>> commit message for that change is completely and totally unhelpful.
>
> others like to to whitebox methods, ..., please try attach patch to
> see if duron support PAT.
> diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
> index a428ffc..81483ec 100644
> --- a/arch/x86/kernel/cpu/common.c
> +++ b/arch/x86/kernel/cpu/common.c
> @@ -314,6 +314,8 @@ static void __cpuinit early_get_cap(struct cpuinfo_x86 *c)
> case X86_VENDOR_AMD:
> if (c->x86 >= 0xf && c->x86 <= 0x11)
> set_cpu_cap(c, X86_FEATURE_PAT);
> + if (c->x86 == 6 && c->x86_modes == 7)
> + set_cpu_cap(c, X86_FEATURE_PAT);
> break;
> case X86_VENDOR_INTEL:
> if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15))
s/modes/model/ but, as far as I'm aware, works fine other than that. When I boot
with CONFIG_X86_PAT after applying that, I see:
x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
and PAT is retained in the feature flags. However, this I do not consider very
surprising. Why is this code doing what it is doing in the first place?
These feature flags are read from hardware in the CPUID instruction. Why is this code
then going "ah, this CPU may _claim_ PAT but we won't actually believe it unless it's
model foo, bar or baz". Is that feature flag buggy?
That is, why is the attached not the better fix? Works fine for me as well and will
retain the PAT feature flag also for for example the AMD family 6, model 1 and model
4 that both also advertise PAT in their feature flags, but wil have lost them now as
well in the same way.
If for some or other reason this explicit PAT white listing is in fact necessary, in
addition to the above, it seems you also need/want the same in generic_identify() in
that same file.
And what it definitely wanted was a changelog...
Rene.
[-- Attachment #2: pat.diff --]
[-- Type: text/plain, Size: 1114 bytes --]
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 35b4f6a..45d8738 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -307,20 +307,6 @@ 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);
- break;
- case X86_VENDOR_INTEL:
- if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15))
- set_cpu_cap(c, X86_FEATURE_PAT);
- break;
- }
-
}
/*
@@ -408,19 +394,6 @@ static void __cpuinit generic_identify(struct cpuinfo_x86 *c)
init_scattered_cpuid_features(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);
- break;
- case X86_VENDOR_INTEL:
- if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15))
- set_cpu_cap(c, X86_FEATURE_PAT);
- break;
- }
}
static void __cpuinit squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
next prev parent reply other threads:[~2008-05-07 12:59 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-07 1:48 2.6.26, PAT and AMD family 6 Rene Herman
2008-05-07 2:39 ` Yinghai Lu
2008-05-07 12:46 ` Undocumented and duplicated code Adrian Bunk
2008-05-07 13:14 ` Rene Herman
2008-05-07 20:52 ` 2.6.26, PAT and AMD family 6 Thomas Gleixner
2008-05-07 20:59 ` Pavel Machek
2008-05-07 21:10 ` Rene Herman
2008-05-07 21:41 ` Thomas Gleixner
2008-05-07 21:46 ` Adrian Bunk
2008-05-07 22:08 ` Thomas Gleixner
2008-05-07 22:29 ` Pavel Machek
2008-05-07 22:04 ` Rene Herman
2008-05-07 22:23 ` Rene Herman
2008-05-07 22:31 ` Yinghai Lu
2008-05-07 22:57 ` H. Peter Anvin
2008-05-08 0:02 ` Rene Herman
2008-05-08 0:03 ` H. Peter Anvin
2008-05-08 0:10 ` Rene Herman
2008-05-08 0:19 ` Linus Torvalds
2008-05-08 0:28 ` Rene Herman
2008-05-08 1:57 ` [PATCH] x86: introduce a new Linux defined feature flag for PAT support Rene Herman
2008-05-08 1:58 ` Linus Torvalds
2008-05-08 2:11 ` H. Peter Anvin
2008-05-08 2:17 ` Rene Herman
2008-05-08 2:24 ` Linus Torvalds
2008-05-08 2:28 ` H. Peter Anvin
2008-05-08 12:49 ` Thomas Gleixner
2008-05-08 13:08 ` Ingo Molnar
2008-05-08 16:44 ` H. Peter Anvin
2008-05-08 13:11 ` Adrian Bunk
2008-05-08 13:33 ` Thomas Gleixner
2008-05-08 14:44 ` Rene Herman
2008-05-08 14:53 ` Thomas Gleixner
2008-05-08 16:48 ` H. Peter Anvin
2008-05-08 16:53 ` Rene Herman
2008-05-08 2:04 ` [PATCH] x86: enable PAT support on AMD Duron model 7 Rene Herman
2008-05-08 2:08 ` Arjan van de Ven
2008-05-08 2:12 ` Rene Herman
2008-05-08 10:19 ` [PATCH] x86: introduce a new Linux defined feature flag for PAT support Andi Kleen
2008-05-08 12:40 ` Rene Herman
2008-05-08 13:39 ` Andi Kleen
2008-05-08 15:32 ` Alan Cox
2008-05-08 16:51 ` H. Peter Anvin
2008-05-08 0:21 ` 2.6.26, PAT and AMD family 6 Thomas Gleixner
2008-05-08 0:30 ` Rene Herman
2008-05-08 0:15 ` Linus Torvalds
2008-05-08 0:31 ` H. Peter Anvin
2008-05-08 10:14 ` Andi Kleen
2008-05-08 16:43 ` H. Peter Anvin
2008-05-07 21:23 ` Adrian Bunk
2008-05-07 21:54 ` Thomas Gleixner
2008-05-07 22:09 ` Adrian Bunk
2008-05-07 22:14 ` Pavel Machek
2008-05-07 22:22 ` Yinghai Lu
2008-05-07 22:37 ` Pavel Machek
2008-05-07 22:40 ` Yinghai Lu
2008-05-07 23:02 ` Pavel Machek
2008-05-07 23:02 ` Thomas Gleixner
2008-05-07 23:10 ` Pavel Machek
2008-05-07 23:46 ` Thomas Gleixner
2008-05-07 22:23 ` Yinghai Lu
2008-05-07 22:39 ` Pavel Machek
2008-05-07 22:45 ` Yinghai Lu
2008-05-07 23:06 ` Pavel Machek
2008-05-07 23:01 ` H. Peter Anvin
2008-05-07 22:26 ` Yinghai Lu
2008-05-07 22:30 ` Rene Herman
2008-05-07 22:58 ` Thomas Gleixner
2008-05-07 13:00 ` Rene Herman [this message]
2008-05-07 13:42 ` Arjan van de Ven
2008-05-07 14:09 ` Rene Herman
2008-05-07 14:24 ` Arjan van de Ven
2008-05-07 19:08 ` Rene Herman
2008-05-07 22:17 ` Arjan van de Ven
2008-05-07 19:39 ` Daniel Hazelton
2008-05-07 20:06 ` Rene Herman
2008-05-07 20:16 ` Yinghai Lu
2008-05-07 20:18 ` Yinghai Lu
2008-05-08 4:06 ` H. Peter Anvin
-- strict thread matches above, loose matches on Subject: below --
2008-05-07 20:44 matthieu castet
2008-05-07 20:46 ` matthieu castet
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=4821A7E2.6080101@keyaccess.nl \
--to=rene.herman@keyaccess.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=yhlu.kernel@gmail.com \
/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