Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1608686

Re: [PATCH 03/17] pci: Only allow WC mmap on prefetchable resources

From David Woodhouse <dwmw2@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH 03/17] pci: Only allow WC mmap on prefetchable resources
Date 2017-03-24 18:10 +0100
Message-ID <toASS-4Ki-17@gated-at.bofh.it> (permalink)
References <tnOuR-32T-7@gated-at.bofh.it> <tnOuS-32T-25@gated-at.bofh.it> <tozWO-44H-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Fri, 2017-03-24 at 17:05 +0100, Arnd Bergmann wrote:
> On Wed, Mar 22, 2017 at 2:25 PM, David Woodhouse <dwmw2@infradead.org> wrote:
> > 
> > From: David Woodhouse <dwmw@amazon.co.uk>
> > 
> > The /proc/bus/pci mmap interface allows the user to specify whether they
> > want WC or not. Don't let them do so on non-prefetchable BARs.
> > 
> > Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
> > Cc: stable@vger.kernel.org
> Can you explain this a little more? I understand that we usually want to use
> WC mappings on prefetchable BARs, and uncached non-WC on
> non-prefetchable, but why do we have to force an error here?
> 
> Couldn't there be some hardware that allows write-combining access
> but no prefetches?

Note that this is only for the procfs interface. The sysfs interface
already imposes the same restriction by just *not* creating the
'resourceX_wc' attr when the resource isn't prefetchable. So this just
brings procfs into line.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 03/17] pci: Only allow WC mmap on prefetchable resources David Woodhouse <dwmw2@infradead.org> - 2017-03-22 14:30 +0100
  Re: [PATCH 03/17] pci: Only allow WC mmap on prefetchable resources Arnd Bergmann <arnd@arndb.de> - 2017-03-24 17:10 +0100
    Re: [PATCH 03/17] pci: Only allow WC mmap on prefetchable resources David Woodhouse <dwmw2@infradead.org> - 2017-03-24 18:10 +0100

csiph-web