lkml.org 
[lkml]   [2008]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] x86: enable PAT on (almost) all CPUs that advertise it
On Wed, Jun 11, 2008 at 11:47:30AM +0200, Andreas Herrmann wrote:
> There seem to be other Intel CPUs that advertise PAT support.
> See cpuinfo output at http://gentoo-wiki.com/Safe_Cflags
> E.g. Pentium M (model 13), Celeron (model 6), Pentium III (model 8).
> (Not sure how correct this information is, though)
>
> Turn the white- into a blacklist for those remaining CPUs until they
> are verified?

How about the attached patch.
This one should replace patches 1 and 2 that I've sent before.


Regards,

Andreas
--

x86: PAT: enable PAT on (almost) all CPUs that advertise it

Dave Jones recently added Centaur and Transmeta CPUs to the
PAT whitelist. See this thread
http://marc.info/?l=linux-kernel&m=121125666327279

I've checked that for AMD CPUs there are no known errata regarding PAT
-- if the CPU advertises it it should work.

I am not aware of other CPUs which claim to support PAT and are not
verified (besides some older Intel CPU models).

So it's time to enable PAT on CPUs that claim to support it.

I just kept the "whitelist" for Intel CPUs. It is similar to what was
submitted by Venkatesh in the first place.
See pat_known_cpu() in commit 2e5d9c857d4e6c9e7b7d8c8c86a68a7842d213d6
(x86: PAT infrastructure patch).

CC: Dave Jones <davej@redhat.com>
CC: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
---
arch/x86/kernel/cpu/addon_cpuid_features.c | 19 +++++--------------
1 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c
index d8b3e4a..3a66ef4 100644
--- a/arch/x86/kernel/cpu/addon_cpuid_features.c
+++ b/arch/x86/kernel/cpu/addon_cpuid_features.c
@@ -53,22 +53,13 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)
#ifdef CONFIG_X86_PAT
void __cpuinit validate_pat_support(struct cpuinfo_x86 *c)
{
- switch (c->x86_vendor) {
- case X86_VENDOR_AMD:
- if (c->x86 >= 0xf && c->x86 <= 0x11)
- return;
- break;
- case X86_VENDOR_INTEL:
- if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15))
- return;
- break;
- case X86_VENDOR_CENTAUR:
- case X86_VENDOR_TRANSMETA:
+ if (!cpu_has_pat) {
+ pat_disable("PAT not supported by CPU.");
return;
}

- pat_disable(cpu_has_pat ?
- "PAT disabled. Not yet verified on this CPU type." :
- "PAT not supported by CPU.");
+ if ((c->x86_vendor == X86_VENDOR_INTEL) &&
+ !(c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15)))
+ pat_disable("PAT disabled. Not yet verified on this CPU type.");
}
#endif
--
1.5.5.3




\
 
 \ /
  Last update: 2008-06-11 17:11    [W:0.550 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site