Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-06-30 Thread Will Deacon
Hi Rob, Nice work! On Fri, Jun 27, 2014 at 05:15:53PM +0100, Rob Herring wrote: > On 06/27/2014 07:49 AM, Will Deacon wrote: > > On Fri, Jun 27, 2014 at 12:03:34PM +0100, Arnd Bergmann wrote: > >> On Thursday 26 June 2014 19:44:21 Rob Herring wrote: > >>> I don't agree arm32 is harder than microb

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-06-27 Thread Rob Herring
On 06/27/2014 07:49 AM, Will Deacon wrote: > On Fri, Jun 27, 2014 at 12:03:34PM +0100, Arnd Bergmann wrote: >> On Thursday 26 June 2014 19:44:21 Rob Herring wrote: >>> I don't agree arm32 is harder than microblaze. Yes, converting ALL of >>> arm would be, but that is not necessary. With Liviu's lat

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-06-27 Thread Liviu Dudau
On Fri, Jun 27, 2014 at 03:55:04PM +0100, Bjorn Helgaas wrote: > On Fri, Jun 27, 2014 at 8:14 AM, Catalin Marinas > wrote: > > ... > > With Liviu's latest version (not posted) and with > > of_create_pci_host_bridge() function moved to of_pci.c, I don't think > > there is much new functionality add

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-06-27 Thread Bjorn Helgaas
On Fri, Jun 27, 2014 at 8:14 AM, Catalin Marinas wrote: > ... > With Liviu's latest version (not posted) and with > of_create_pci_host_bridge() function moved to of_pci.c, I don't think > there is much new functionality added to drivers/pci/. What I think we > need is clarifying the domain_nr patc

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-06-27 Thread Catalin Marinas
On Fri, Jun 27, 2014 at 01:44:21AM +0100, Rob Herring wrote: > On Thu, Jun 26, 2014 at 3:59 AM, Catalin Marinas > wrote: > > Although a bit late, I'm raising this now and hopefully we'll come to a > > conclusion soon. Delaying arm64 PCIe support even further is not a real > > option, which leaves

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-06-27 Thread Catalin Marinas
On Fri, Jun 27, 2014 at 02:16:28PM +0100, Arnd Bergmann wrote: > On Friday 27 June 2014 13:49:49 Will Deacon wrote: > > On Fri, Jun 27, 2014 at 12:03:34PM +0100, Arnd Bergmann wrote: > > > On Thursday 26 June 2014 19:44:21 Rob Herring wrote: > > > > I don't agree arm32 is harder than microblaze. Ye

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-06-27 Thread Arnd Bergmann
On Friday 27 June 2014 13:49:49 Will Deacon wrote: > On Fri, Jun 27, 2014 at 12:03:34PM +0100, Arnd Bergmann wrote: > > On Thursday 26 June 2014 19:44:21 Rob Herring wrote: > > > I don't agree arm32 is harder than microblaze. Yes, converting ALL of > > > arm would be, but that is not necessary. Wit

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-06-27 Thread Will Deacon
On Fri, Jun 27, 2014 at 12:03:34PM +0100, Arnd Bergmann wrote: > On Thursday 26 June 2014 19:44:21 Rob Herring wrote: > > I don't agree arm32 is harder than microblaze. Yes, converting ALL of > > arm would be, but that is not necessary. With Liviu's latest branch > > the hacks I previously needed a

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-06-27 Thread Arnd Bergmann
On Thursday 26 June 2014 19:44:21 Rob Herring wrote: > > Although a bit late, I'm raising this now and hopefully we'll come to a > > conclusion soon. Delaying arm64 PCIe support even further is not a real > > option, which leaves us with: > > > > 1. Someone else (with enough PCIe knowledge) volunte

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-06-26 Thread Rob Herring
Adding Michael Simek... On Thu, Jun 26, 2014 at 3:59 AM, Catalin Marinas wrote: > (sorry for replying to a months old thread) > > On Mon, Apr 07, 2014 at 06:58:24PM +0100, Bjorn Helgaas wrote: >> On Mon, Apr 7, 2014 at 5:36 AM, Arnd Bergmann wrote: >> >> > I think migrating other architectures t

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-06-26 Thread Will Deacon
On Thu, Jun 26, 2014 at 03:11:38PM +0100, Catalin Marinas wrote: > On Thu, Jun 26, 2014 at 10:30:29AM +0100, Liviu Dudau wrote: > > On Thu, Jun 26, 2014 at 09:59:26AM +0100, Catalin Marinas wrote: > > > Although a bit late, I'm raising this now and hopefully we'll come to a > > > conclusion soon. D

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-06-26 Thread Catalin Marinas
On Thu, Jun 26, 2014 at 10:30:29AM +0100, Liviu Dudau wrote: > On Thu, Jun 26, 2014 at 09:59:26AM +0100, Catalin Marinas wrote: > > Although a bit late, I'm raising this now and hopefully we'll come to a > > conclusion soon. Delaying arm64 PCIe support even further is not a real > > option, which l

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-06-26 Thread Liviu Dudau
On Thu, Jun 26, 2014 at 09:59:26AM +0100, Catalin Marinas wrote: > (sorry for replying to a months old thread) > > On Mon, Apr 07, 2014 at 06:58:24PM +0100, Bjorn Helgaas wrote: > > On Mon, Apr 7, 2014 at 5:36 AM, Arnd Bergmann wrote: > > > > > I think migrating other architectures to use the sa

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-06-26 Thread Catalin Marinas
(sorry for replying to a months old thread) On Mon, Apr 07, 2014 at 06:58:24PM +0100, Bjorn Helgaas wrote: > On Mon, Apr 7, 2014 at 5:36 AM, Arnd Bergmann wrote: > > > I think migrating other architectures to use the same code should be > > a separate effort from adding a generic implementation

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-04-08 Thread Bjorn Helgaas
On Tue, Apr 8, 2014 at 4:22 AM, Arnd Bergmann wrote: > On Tuesday 08 April 2014 10:50:39 Liviu Dudau wrote: >> On Mon, Apr 07, 2014 at 06:58:24PM +0100, Bjorn Helgaas wrote: >> > On Mon, Apr 7, 2014 at 5:36 AM, Arnd Bergmann wrote: >> > >> > > I think migrating other architectures to use the same

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-04-08 Thread Bjorn Helgaas
On Tue, Apr 8, 2014 at 4:11 AM, Arnd Bergmann wrote: > There is a wide range of implementations across architectures: > > a) no access to I/O ports at all (tile, s390, ...) > b) access to I/O ports only through special instructions (x86, ...) > c) all MMIO is mapped virtual contiguous to PCI_IOBA

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-04-08 Thread Arnd Bergmann
On Tuesday 08 April 2014 10:50:39 Liviu Dudau wrote: > On Mon, Apr 07, 2014 at 06:58:24PM +0100, Bjorn Helgaas wrote: > > On Mon, Apr 7, 2014 at 5:36 AM, Arnd Bergmann wrote: > > > > > I think migrating other architectures to use the same code should be > > > a separate effort from adding a gener

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-04-08 Thread Arnd Bergmann
On Tuesday 08 April 2014 10:49:33 Liviu Dudau wrote: > On Tue, Apr 08, 2014 at 12:21:51AM +0100, Bjorn Helgaas wrote: > > On Fri, Mar 14, 2014 at 9:34 AM, Liviu Dudau wrote: > > > Some architectures do not share x86 simple view of the PCI I/O space > > > and instead use a range of addresses that m

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-04-08 Thread Liviu Dudau
On Mon, Apr 07, 2014 at 06:58:24PM +0100, Bjorn Helgaas wrote: > On Mon, Apr 7, 2014 at 5:36 AM, Arnd Bergmann wrote: > > > I think migrating other architectures to use the same code should be > > a separate effort from adding a generic implementation that can be > > used by arm64. It's probably

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-04-08 Thread Liviu Dudau
On Tue, Apr 08, 2014 at 12:21:51AM +0100, Bjorn Helgaas wrote: > On Fri, Mar 14, 2014 at 9:34 AM, Liviu Dudau wrote: > > Some architectures do not share x86 simple view of the PCI I/O space > > and instead use a range of addresses that map to bus addresses. For > > some architectures these ranges

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-04-08 Thread Arnd Bergmann
On Monday 07 April 2014 17:21:51 Bjorn Helgaas wrote: > On Fri, Mar 14, 2014 at 9:34 AM, Liviu Dudau wrote: > > Some architectures do not share x86 simple view of the PCI I/O space > > and instead use a range of addresses that map to bus addresses. For > > some architectures these ranges will be e

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-04-07 Thread Bjorn Helgaas
On Fri, Mar 14, 2014 at 9:34 AM, Liviu Dudau wrote: > Some architectures do not share x86 simple view of the PCI I/O space > and instead use a range of addresses that map to bus addresses. For > some architectures these ranges will be expressed by OF bindings > in a device tree file. > > Introduce

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-04-07 Thread Bjorn Helgaas
On Mon, Apr 7, 2014 at 5:36 AM, Arnd Bergmann wrote: > I think migrating other architectures to use the same code should be > a separate effort from adding a generic implementation that can be > used by arm64. It's probably a good idea to have patches to convert > arm32 and/or microblaze. Let me

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-04-07 Thread Liviu Dudau
On Mon, Apr 07, 2014 at 12:36:15PM +0100, Arnd Bergmann wrote: > On Monday 07 April 2014 09:31:20 Liviu Dudau wrote: > > On Sat, Apr 05, 2014 at 01:19:53AM +0100, Bjorn Helgaas wrote: > > > > > Host bridges on x86 could have MMIO apertures that turn CPU memory > > > accesses > > > into PCI port ac

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-04-07 Thread Arnd Bergmann
On Monday 07 April 2014 09:31:20 Liviu Dudau wrote: > On Sat, Apr 05, 2014 at 01:19:53AM +0100, Bjorn Helgaas wrote: > > > Host bridges on x86 could have MMIO apertures that turn CPU memory accesses > > into PCI port accesses. We could implement any number of I/O port spaces > > this way, by makin

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-04-07 Thread Arnd Bergmann
On Monday 07 April 2014 19:13:28 Benjamin Herrenschmidt wrote: > On Mon, 2014-04-07 at 09:35 +0100, Liviu Dudau wrote: > > Thanks for the summary, is really useful as I was recently looking > > into code in that > > area. One thing I was trying to understand is why ppc needs _IO_BASE > > at all rat

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-04-07 Thread Benjamin Herrenschmidt
On Mon, 2014-04-07 at 09:35 +0100, Liviu Dudau wrote: > Thanks for the summary, is really useful as I was recently looking > into code in that > area. One thing I was trying to understand is why ppc needs _IO_BASE > at all rather > than using the generic PCI_IOBASE? Perhaps because our code preda

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-04-07 Thread Liviu Dudau
On Sun, Apr 06, 2014 at 10:49:53AM +0100, Benjamin Herrenschmidt wrote: > On Fri, 2014-04-04 at 18:19 -0600, Bjorn Helgaas wrote: > > > Introduce a pci_register_io_range() helper function that can be used > > > by the architecture code to keep track of the I/O ranges described by the > > > PCI bind

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-04-07 Thread Liviu Dudau
On Sat, Apr 05, 2014 at 01:19:53AM +0100, Bjorn Helgaas wrote: > On Fri, Mar 14, 2014 at 03:34:27PM +, Liviu Dudau wrote: > > Some architectures do not share x86 simple view of the PCI I/O space > > and instead use a range of addresses that map to bus addresses. For > > some architectures these

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-04-06 Thread Benjamin Herrenschmidt
On Fri, 2014-04-04 at 18:19 -0600, Bjorn Helgaas wrote: > > Introduce a pci_register_io_range() helper function that can be used > > by the architecture code to keep track of the I/O ranges described by the > > PCI bindings. If the PCI_IOBASE macro is not defined that signals > > lack of support fo

Re: [PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-04-04 Thread Bjorn Helgaas
On Fri, Mar 14, 2014 at 03:34:27PM +, Liviu Dudau wrote: > Some architectures do not share x86 simple view of the PCI I/O space > and instead use a range of addresses that map to bus addresses. For > some architectures these ranges will be expressed by OF bindings > in a device tree file. It's

[PATCH v7 1/6] pci: Introduce pci_register_io_range() helper function.

2014-03-14 Thread Liviu Dudau
Some architectures do not share x86 simple view of the PCI I/O space and instead use a range of addresses that map to bus addresses. For some architectures these ranges will be expressed by OF bindings in a device tree file. Introduce a pci_register_io_range() helper function that can be used by t