Re: [Xen-devel] [PATCH v1 05/47] pci: add pci_iomap_wc() variants

2015-04-21 Thread Luis R. Rodriguez
On Tue, Apr 21, 2015 at 12:25 PM, Michael S. Tsirkin wrote: > To summarise, driver needs to know what it's doing, > we can't set WC in the pci core automatically. Thanks, I'll document this and proceed with device driver helpers to aid with this. Luis __

Re: [Xen-devel] [PATCH v1 05/47] pci: add pci_iomap_wc() variants

2015-04-21 Thread Michael S. Tsirkin
On Mon, Mar 23, 2015 at 12:20:47PM -0500, Bjorn Helgaas wrote: > pci_iomap_range() already makes a cacheable mapping if > IORESOURCE_CACHEABLE; I'm guessing that you would like it to > automatically use WC if the BAR if IORESOURCE_PREFETCH, e.g., > > if (flags & IORESOURCE_CACHEABLE) > retur

Re: [Xen-devel] [PATCH v1 05/47] pci: add pci_iomap_wc() variants

2015-04-21 Thread Michael S. Tsirkin
On Tue, Apr 21, 2015 at 07:52:49PM +0200, Luis R. Rodriguez wrote: > On Thu, Mar 26, 2015 at 04:00:54AM +0100, Luis R. Rodriguez wrote: > > On Mon, Mar 23, 2015 at 12:20:47PM -0500, Bjorn Helgaas wrote: > > > Hi Luis, > > > > > > This seems OK to me, > > > > Great. > > > > > but I'm curious abo

Re: [Xen-devel] [PATCH v1 05/47] pci: add pci_iomap_wc() variants

2015-04-21 Thread Luis R. Rodriguez
On Thu, Mar 26, 2015 at 04:00:54AM +0100, Luis R. Rodriguez wrote: > On Mon, Mar 23, 2015 at 12:20:47PM -0500, Bjorn Helgaas wrote: > > Hi Luis, > > > > This seems OK to me, > > Great. > > > but I'm curious about a few things. > > > > On Fri, Mar 20, 2015 at 6:17 PM, Luis R. Rodriguez > > wro

Re: [Xen-devel] [PATCH v1 05/47] pci: add pci_iomap_wc() variants

2015-03-27 Thread Toshi Kani
On Mon, 2015-03-23 at 12:20 -0500, Bjorn Helgaas wrote: : > pci_iomap_range() already makes a cacheable mapping if > IORESOURCE_CACHEABLE; I'm guessing that you would like it to > automatically use WC if the BAR if IORESOURCE_PREFETCH, e.g., > > if (flags & IORESOURCE_CACHEABLE) > return io

Re: [Xen-devel] [PATCH v1 05/47] pci: add pci_iomap_wc() variants

2015-03-27 Thread Luis R. Rodriguez
On Wed, Mar 25, 2015 at 04:07:43PM -0400, Konrad Rzeszutek Wilk wrote: > On Fri, Mar 20, 2015 at 04:17:55PM -0700, Luis R. Rodriguez wrote: > > From: "Luis R. Rodriguez" > > > > This allows drivers to take advantage of write-combining > > when possible. Ideally we'd have pci_read_bases() just > >

Re: [Xen-devel] [PATCH v1 05/47] pci: add pci_iomap_wc() variants

2015-03-25 Thread Luis R. Rodriguez
On Mon, Mar 23, 2015 at 12:20:47PM -0500, Bjorn Helgaas wrote: > Hi Luis, > > This seems OK to me, Great. > but I'm curious about a few things. > > On Fri, Mar 20, 2015 at 6:17 PM, Luis R. Rodriguez > wrote: > > From: "Luis R. Rodriguez" > > > > This allows drivers to take advantage of write

Re: [Xen-devel] [PATCH v1 05/47] pci: add pci_iomap_wc() variants

2015-03-25 Thread Konrad Rzeszutek Wilk
On Fri, Mar 20, 2015 at 04:17:55PM -0700, Luis R. Rodriguez wrote: > From: "Luis R. Rodriguez" > > This allows drivers to take advantage of write-combining > when possible. Ideally we'd have pci_read_bases() just > peg an IORESOURCE_WC flag for us but where exactly > video devices memory lie vari

Re: [Xen-devel] [PATCH v1 05/47] pci: add pci_iomap_wc() variants

2015-03-23 Thread Bjorn Helgaas
Hi Luis, This seems OK to me, but I'm curious about a few things. On Fri, Mar 20, 2015 at 6:17 PM, Luis R. Rodriguez wrote: > From: "Luis R. Rodriguez" > > This allows drivers to take advantage of write-combining > when possible. Ideally we'd have pci_read_bases() just > peg an IORESOURCE_WC fl

[Xen-devel] [PATCH v1 05/47] pci: add pci_iomap_wc() variants

2015-03-20 Thread Luis R. Rodriguez
From: "Luis R. Rodriguez" This allows drivers to take advantage of write-combining when possible. Ideally we'd have pci_read_bases() just peg an IORESOURCE_WC flag for us but where exactly video devices memory lie varies *largely* and at times things are mixed with MMIO registers, sometimes we ca