public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Herrmann <andreas.herrmann3@amd.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Rene Herman <rene.herman@keyaccess.nl>,
	Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org,
	Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>,
	Suresh B Siddha <suresh.b.siddha@intel.com>,
	Dave Jones <davej@redhat.com>
Subject: [PATCH] x86: enable PAT on (almost) all CPUs that advertise it
Date: Wed, 11 Jun 2008 17:05:07 +0200	[thread overview]
Message-ID: <20080611150507.GD5170@alberich.amd.com> (raw)
In-Reply-To: <20080611094730.GB5889@alberich.amd.com>

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




  reply	other threads:[~2008-06-11 15:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10 14:05 [PATCH 2/5] x86: PAT: fix ambiguous paranoia check in pat_init() Andreas Herrmann
2008-06-10 22:55 ` Rene Herman
2008-06-10 23:33   ` H. Peter Anvin
2008-06-11  9:47     ` Andreas Herrmann
2008-06-11 15:05       ` Andreas Herrmann [this message]
2008-06-11 16:44         ` [PATCH] x86: enable PAT on (almost) all CPUs that advertise it H. Peter Anvin
2008-06-11 17:35       ` [PATCH 2/5] x86: PAT: fix ambiguous paranoia check in pat_init() H. Peter Anvin
2008-06-11  9:41   ` Andreas Herrmann
2008-06-11 12:58     ` Rene Herman
2008-06-11 16:12       ` Andreas Herrmann
2008-06-12  4:32         ` Rene Herman

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=20080611150507.GD5170@alberich.amd.com \
    --to=andreas.herrmann3@amd.com \
    --cc=davej@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rene.herman@keyaccess.nl \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=venkatesh.pallipadi@intel.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