Re: [PATCH v8 5/9] PCI: Add pci_iomap_wc() variants

2015-06-25 Thread Luis R. Rodriguez
On Thu, Jun 25, 2015 at 8:09 AM, Borislav Petkov wrote: >> +void __iomem *pci_iomap_wc_range(struct pci_dev *dev, >> + int bar, >> + unsigned long offset, >> + unsigned long maxlen) >> +{ >> + resource_size_

Re: [PATCH v8 5/9] PCI: Add pci_iomap_wc() variants

2015-06-25 Thread Borislav Petkov
On Wed, Jun 24, 2015 at 06:22:18PM -0700, Luis R. Rodriguez wrote: > From: "Luis R. Rodriguez" > > PCI BARs tell us whether prefetching is safe, but they don't say anything > about write combining (WC). WC changes ordering rules and allows writes to > be collapsed, so it's not safe in general to

[PATCH v8 5/9] PCI: Add pci_iomap_wc() variants

2015-06-24 Thread Luis R. Rodriguez
From: "Luis R. Rodriguez" PCI BARs tell us whether prefetching is safe, but they don't say anything about write combining (WC). WC changes ordering rules and allows writes to be collapsed, so it's not safe in general to use it on a prefetchable region. Add pci_iomap_wc() and pci_iomap_wc_range(