Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-07 Thread Arnd Bergmann
On Monday, June 6, 2016 7:28:22 PM CEST Bjorn Helgaas wrote: > The caller is performing one abstract operation: reading or writing > config space of a PCI device. In the caller's context, it makes no > difference whether it's a type0 or type1 access. > > Moving the test from the host bridge

Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-07 Thread Arnd Bergmann
On Monday, June 6, 2016 7:28:22 PM CEST Bjorn Helgaas wrote: > The caller is performing one abstract operation: reading or writing > config space of a PCI device. In the caller's context, it makes no > difference whether it's a type0 or type1 access. > > Moving the test from the host bridge

Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-06 Thread Bjorn Helgaas
On Thu, Jun 02, 2016 at 05:06:55PM +0200, Arnd Bergmann wrote: > On Thursday, June 2, 2016 9:00:01 AM CEST Bjorn Helgaas wrote: > > > I just did a count of the implementations of pci_ops: I found 107 > > > instances of 'struct pci_ops', and 67 of them treat type0 and type1 > > > access differently

Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-06 Thread Bjorn Helgaas
On Thu, Jun 02, 2016 at 05:06:55PM +0200, Arnd Bergmann wrote: > On Thursday, June 2, 2016 9:00:01 AM CEST Bjorn Helgaas wrote: > > > I just did a count of the implementations of pci_ops: I found 107 > > > instances of 'struct pci_ops', and 67 of them treat type0 and type1 > > > access differently

Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-03 Thread Arnd Bergmann
On Thursday, June 2, 2016 9:00:01 AM CEST Bjorn Helgaas wrote: > > I just did a count of the implementations of pci_ops: I found 107 > > instances of 'struct pci_ops', and 67 of them treat type0 and type1 > > access differently in some form. > > > > I'd estimate that about half of them, or

Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-03 Thread Arnd Bergmann
On Thursday, June 2, 2016 9:00:01 AM CEST Bjorn Helgaas wrote: > > I just did a count of the implementations of pci_ops: I found 107 > > instances of 'struct pci_ops', and 67 of them treat type0 and type1 > > access differently in some form. > > > > I'd estimate that about half of them, or

Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-02 Thread Arnd Bergmann
On Thursday, June 2, 2016 9:00:01 AM CEST Bjorn Helgaas wrote: > On Wed, Jun 01, 2016 at 10:37:28PM +0200, Arnd Bergmann wrote: > > On Wednesday, June 1, 2016 2:04:30 PM CEST Bjorn Helgaas wrote: > > > On Wed, Jun 01, 2016 at 05:41:53PM +0200, Arnd Bergmann wrote: > > > > On Wednesday, June 1,

Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-02 Thread Arnd Bergmann
On Thursday, June 2, 2016 9:00:01 AM CEST Bjorn Helgaas wrote: > On Wed, Jun 01, 2016 at 10:37:28PM +0200, Arnd Bergmann wrote: > > On Wednesday, June 1, 2016 2:04:30 PM CEST Bjorn Helgaas wrote: > > > On Wed, Jun 01, 2016 at 05:41:53PM +0200, Arnd Bergmann wrote: > > > > On Wednesday, June 1,

Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-02 Thread Bjorn Helgaas
On Wed, Jun 01, 2016 at 10:37:28PM +0200, Arnd Bergmann wrote: > On Wednesday, June 1, 2016 2:04:30 PM CEST Bjorn Helgaas wrote: > > On Wed, Jun 01, 2016 at 05:41:53PM +0200, Arnd Bergmann wrote: > > > On Wednesday, June 1, 2016 10:09:29 AM CEST Bjorn Helgaas wrote: > > > > Hi Arnd, > > > > > > >

Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-02 Thread Bjorn Helgaas
On Wed, Jun 01, 2016 at 10:37:28PM +0200, Arnd Bergmann wrote: > On Wednesday, June 1, 2016 2:04:30 PM CEST Bjorn Helgaas wrote: > > On Wed, Jun 01, 2016 at 05:41:53PM +0200, Arnd Bergmann wrote: > > > On Wednesday, June 1, 2016 10:09:29 AM CEST Bjorn Helgaas wrote: > > > > Hi Arnd, > > > > > > >

Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-02 Thread Arnd Bergmann
On Wednesday, June 1, 2016 2:04:30 PM CEST Bjorn Helgaas wrote: > On Wed, Jun 01, 2016 at 05:41:53PM +0200, Arnd Bergmann wrote: > > On Wednesday, June 1, 2016 10:09:29 AM CEST Bjorn Helgaas wrote: > > > Hi Arnd, > > > > > > On Wed, Jun 01, 2016 at 02:31:22PM +0200, Arnd Bergmann wrote: > > > > A

Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-02 Thread Arnd Bergmann
On Wednesday, June 1, 2016 2:04:30 PM CEST Bjorn Helgaas wrote: > On Wed, Jun 01, 2016 at 05:41:53PM +0200, Arnd Bergmann wrote: > > On Wednesday, June 1, 2016 10:09:29 AM CEST Bjorn Helgaas wrote: > > > Hi Arnd, > > > > > > On Wed, Jun 01, 2016 at 02:31:22PM +0200, Arnd Bergmann wrote: > > > > A

Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-01 Thread Bjorn Helgaas
On Wed, Jun 01, 2016 at 05:41:53PM +0200, Arnd Bergmann wrote: > On Wednesday, June 1, 2016 10:09:29 AM CEST Bjorn Helgaas wrote: > > Hi Arnd, > > > > On Wed, Jun 01, 2016 at 02:31:22PM +0200, Arnd Bergmann wrote: > > > A lot of PCI host bridges require different methods for initiating > > > type

Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-01 Thread Bjorn Helgaas
On Wed, Jun 01, 2016 at 05:41:53PM +0200, Arnd Bergmann wrote: > On Wednesday, June 1, 2016 10:09:29 AM CEST Bjorn Helgaas wrote: > > Hi Arnd, > > > > On Wed, Jun 01, 2016 at 02:31:22PM +0200, Arnd Bergmann wrote: > > > A lot of PCI host bridges require different methods for initiating > > > type

Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-01 Thread Arnd Bergmann
On Wednesday, June 1, 2016 10:09:29 AM CEST Bjorn Helgaas wrote: > Hi Arnd, > > On Wed, Jun 01, 2016 at 02:31:22PM +0200, Arnd Bergmann wrote: > > A lot of PCI host bridges require different methods for initiating > > type 0 and type 1 config space accesses, leading to duplication of > > code. >

Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-01 Thread Arnd Bergmann
On Wednesday, June 1, 2016 10:09:29 AM CEST Bjorn Helgaas wrote: > Hi Arnd, > > On Wed, Jun 01, 2016 at 02:31:22PM +0200, Arnd Bergmann wrote: > > A lot of PCI host bridges require different methods for initiating > > type 0 and type 1 config space accesses, leading to duplication of > > code. >

Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-01 Thread Bjorn Helgaas
Hi Arnd, On Wed, Jun 01, 2016 at 02:31:22PM +0200, Arnd Bergmann wrote: > A lot of PCI host bridges require different methods for initiating > type 0 and type 1 config space accesses, leading to duplication of > code. > > This adds support for the two different kinds at the pci_ops > level, with

Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-01 Thread Bjorn Helgaas
Hi Arnd, On Wed, Jun 01, 2016 at 02:31:22PM +0200, Arnd Bergmann wrote: > A lot of PCI host bridges require different methods for initiating > type 0 and type 1 config space accesses, leading to duplication of > code. > > This adds support for the two different kinds at the pci_ops > level, with

[PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-01 Thread Arnd Bergmann
A lot of PCI host bridges require different methods for initiating type 0 and type 1 config space accesses, leading to duplication of code. This adds support for the two different kinds at the pci_ops level, with the newly added map_bridge/read_bridge/write_bridge operations for type 1 accesses.

[PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-01 Thread Arnd Bergmann
A lot of PCI host bridges require different methods for initiating type 0 and type 1 config space accesses, leading to duplication of code. This adds support for the two different kinds at the pci_ops level, with the newly added map_bridge/read_bridge/write_bridge operations for type 1 accesses.