mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dave Airlie" <airlied@gmail.com>
To: venkatesh.pallipadi@intel.com
Cc: mingo@elte.hu, tglx@linutronix.de, hpa@zytor.com,
	linux-kernel@vger.kernel.org, suresh.b.siddha@intel.com
Subject: Re: [patch 3/4] x86: PAT Update validate_pat_support for intel CPUs
Date: Tue, 26 Aug 2008 17:05:48 +1000	[thread overview]
Message-ID: <21d7e9970808260005g14ec71e9xfa584780498a86e7@mail.gmail.com> (raw)
In-Reply-To: <20080820234604.592277000@intel.com>

On Thu, Aug 21, 2008 at 9:45 AM,  <venkatesh.pallipadi@intel.com> wrote:
> Pentium III and Core Solo/Duo CPUs have an erratum
> " Page with PAT set to WC while associated MTRR is UC may consolidate to UC "
> which can result in WC setting in PAT to be ineffective. We will disable
> PAT on such CPUs, so that we can continue to use MTRR WC setting.
>

IMHO this seems like a bit hammer with which to squash this nut.

I really need PAT support for upcoming GPU stuff, esp where I have
pages of RAM allocated into a
GART and I want write-combined access to them. These pages will
physically me under a write-back MTRR, with a WC PAT entry
on the PTE mappings.

Can we not just be smarter and fix this when we know we have a UC MTRR
and a WC PAT mapping inside it?

Dave.

> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
>
> ---
>  arch/x86/kernel/cpu/addon_cpuid_features.c |   17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
>
> Index: tip/arch/x86/kernel/cpu/addon_cpuid_features.c
> ===================================================================
> --- tip.orig/arch/x86/kernel/cpu/addon_cpuid_features.c 2008-08-20 14:25:18.000000000 -0700
> +++ tip/arch/x86/kernel/cpu/addon_cpuid_features.c      2008-08-20 14:26:39.000000000 -0700
> @@ -56,9 +56,22 @@ void __cpuinit validate_pat_support(stru
>
>        switch (c->x86_vendor) {
>        case X86_VENDOR_INTEL:
> -               if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15))
> +               /*
> +                * There is a known erratum on Pentium III and Core Solo
> +                * and Core Duo CPUs.
> +                * " Page with PAT set to WC while associated MTRR is UC
> +                *   may consolidate to UC "
> +                * Because of this erratum, it is better to stick with
> +                * setting WC in MTRR rather than using PAT on these CPUs.
> +                *
> +                * Enable PAT WC only on P4, Core 2 or later CPUs.
> +                */
> +               if (c->x86 > 0x6 || (c->x86 == 6 && c->x86_model >= 15))
>                        return;
> -               break;
> +
> +               pat_disable("PAT WC disabled due to known CPU erratum.");
> +               return;
> +
>        case X86_VENDOR_AMD:
>        case X86_VENDOR_CENTAUR:
>        case X86_VENDOR_TRANSMETA:
>
> --
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

  reply	other threads:[~2008-08-26  7:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20 23:45 [patch 0/4] PAT Misc updates venkatesh.pallipadi
2008-08-20 23:45 ` [patch 1/4] x86: PAT proper tracking of set_memory_uc and friends venkatesh.pallipadi
2008-08-20 23:45 ` [patch 2/4] x86: PAT Change /dev/mem mmap with O_SYNC to use UC_MINUS venkatesh.pallipadi
2008-08-20 23:45 ` [patch 3/4] x86: PAT Update validate_pat_support for intel CPUs venkatesh.pallipadi
2008-08-26  7:05   ` Dave Airlie [this message]
2008-08-26 23:03     ` Pallipadi, Venkatesh
2008-08-27  5:30       ` Brice Goglin
2008-08-29 22:59         ` Pallipadi, Venkatesh
2008-08-20 23:45 ` [patch 4/4] x86: PAT documentation updates with debug info venkatesh.pallipadi
2008-08-21 11:30 ` [patch 0/4] PAT Misc updates Ingo Molnar

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=21d7e9970808260005g14ec71e9xfa584780498a86e7@mail.gmail.com \
    --to=airlied@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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

all inboxes | Powered by JetHome®