From: Jesse Barnes <jesse.barnes@intel.com>
To: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>,
Thomas Schlichter <thomas.schlichter@web.de>,
LKML <linux-kernel@vger.kernel.org>,
Eric Anholt <eric@anholt.net>,
Thomas Hellstrom <thellstrom@vmware.com>,
Jan Beulich <JBeulich@novell.com>
Subject: Re: [patch] x86, pat: return EINVAL for pci mmap WC request for !pat_enabled
Date: Mon, 26 Oct 2009 14:12:52 -0700 [thread overview]
Message-ID: <20091026141252.57803f63@jbarnes-g45> (raw)
In-Reply-To: <1256336760.2576.8.camel@sbs-t61>
On Mon, 26 Oct 2009 13:21:32 -0800
Suresh Siddha <suresh.b.siddha@intel.com> wrote:
> Thomas Schlichter reported:
> > X.org uses libpciaccess which tries to mmap with write combining
> > enabled via /sys/bus/pci/devices/*/resource0_wc. Currently, when
> > PAT is not enabled, the kernel does fall back to uncached mmap.
> > Then libpciaccess thinks it succeeded mapping with write combining
> > enabled and does not set up suited MTRR entries. ;-(
>
> Instead of silently mapping pci mmap region as UC minus in the case
> of !pat_enabled and wc request, we can return error. Eric Anholt
> mentioned that caller (like X) typically follows up with UC minus pci
> mmap request and if there is a free mtrr slot, caller will manage
> adding WC mtrr.
>
> Jesse Barnes says:
> > Older versions of libpciaccess will behave better if we do it that
> > way (iirc it only allocates an MTRR if the resource_wc file doesn't
> > exist or fails to get mapped).
>
> Reported-by: Thomas Schlichter <thomas.schlichter@web.de>
> Signed-off-by: Thomas Schlichter <thomas.schlichter@web.de>
> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
> Acked-by: Eric Anholt <eric@anholt.net>
> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---
>
Applied to my linux-next branch, thanks.
--
Jesse Barnes, Intel Open Source Technology Center
prev parent reply other threads:[~2009-10-26 21:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-23 22:26 Suresh Siddha
2009-10-26 21:12 ` Jesse Barnes [this message]
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=20091026141252.57803f63@jbarnes-g45 \
--to=jesse.barnes@intel.com \
--cc=JBeulich@novell.com \
--cc=eric@anholt.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=suresh.b.siddha@intel.com \
--cc=thellstrom@vmware.com \
--cc=thomas.schlichter@web.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®