Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-07-08 Thread Liviu Dudau
On Tue, Jul 08, 2014 at 02:11:36AM +0100, Bjorn Helgaas wrote: > On Fri, Jul 4, 2014 at 8:57 AM, Liviu Dudau wrote: > > On Mon, Apr 07, 2014 at 11:44:51PM +0100, Bjorn Helgaas wrote: > >> On Mon, Apr 7, 2014 at 4:07 AM, Liviu Dudau wrote: > >> > On Mon, Apr 07, 2014 at 10:14:18AM +0100, Benjamin

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-07-08 Thread Liviu Dudau
On Tue, Jul 08, 2014 at 02:11:36AM +0100, Bjorn Helgaas wrote: On Fri, Jul 4, 2014 at 8:57 AM, Liviu Dudau liviu.du...@arm.com wrote: On Mon, Apr 07, 2014 at 11:44:51PM +0100, Bjorn Helgaas wrote: On Mon, Apr 7, 2014 at 4:07 AM, Liviu Dudau liviu.du...@arm.com wrote: On Mon, Apr 07, 2014

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-07-07 Thread Bjorn Helgaas
On Fri, Jul 4, 2014 at 8:57 AM, Liviu Dudau wrote: > On Mon, Apr 07, 2014 at 11:44:51PM +0100, Bjorn Helgaas wrote: >> On Mon, Apr 7, 2014 at 4:07 AM, Liviu Dudau wrote: >> > On Mon, Apr 07, 2014 at 10:14:18AM +0100, Benjamin Herrenschmidt wrote: >> >> On Mon, 2014-04-07 at 09:46 +0100, Liviu

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-07-07 Thread Bjorn Helgaas
On Fri, Jul 4, 2014 at 8:57 AM, Liviu Dudau liviu.du...@arm.com wrote: On Mon, Apr 07, 2014 at 11:44:51PM +0100, Bjorn Helgaas wrote: On Mon, Apr 7, 2014 at 4:07 AM, Liviu Dudau liviu.du...@arm.com wrote: On Mon, Apr 07, 2014 at 10:14:18AM +0100, Benjamin Herrenschmidt wrote: On Mon,

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-07-04 Thread Liviu Dudau
On Mon, Apr 07, 2014 at 11:44:51PM +0100, Bjorn Helgaas wrote: > On Mon, Apr 7, 2014 at 4:07 AM, Liviu Dudau wrote: > > On Mon, Apr 07, 2014 at 10:14:18AM +0100, Benjamin Herrenschmidt wrote: > >> On Mon, 2014-04-07 at 09:46 +0100, Liviu Dudau wrote: > >> > > >> > *My* strategy is to get rid of

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-07-04 Thread Liviu Dudau
On Mon, Apr 07, 2014 at 11:44:51PM +0100, Bjorn Helgaas wrote: On Mon, Apr 7, 2014 at 4:07 AM, Liviu Dudau liviu.du...@arm.com wrote: On Mon, Apr 07, 2014 at 10:14:18AM +0100, Benjamin Herrenschmidt wrote: On Mon, 2014-04-07 at 09:46 +0100, Liviu Dudau wrote: *My* strategy is to get rid

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-07-01 Thread Liviu Dudau
On Mon, Apr 07, 2014 at 11:44:51PM +0100, Bjorn Helgaas wrote: > On Mon, Apr 7, 2014 at 4:07 AM, Liviu Dudau wrote: > > On Mon, Apr 07, 2014 at 10:14:18AM +0100, Benjamin Herrenschmidt wrote: > >> On Mon, 2014-04-07 at 09:46 +0100, Liviu Dudau wrote: > >> > > >> > *My* strategy is to get rid of

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-07-01 Thread Liviu Dudau
On Mon, Apr 07, 2014 at 11:44:51PM +0100, Bjorn Helgaas wrote: On Mon, Apr 7, 2014 at 4:07 AM, Liviu Dudau liviu.du...@arm.com wrote: On Mon, Apr 07, 2014 at 10:14:18AM +0100, Benjamin Herrenschmidt wrote: On Mon, 2014-04-07 at 09:46 +0100, Liviu Dudau wrote: *My* strategy is to get rid

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-11 Thread Arnd Bergmann
On Friday 11 April 2014 10:22:25 Liviu Dudau wrote: > On Thu, Apr 10, 2014 at 09:46:36PM +0100, Arnd Bergmann wrote: > > On Thursday 10 April 2014 15:53:04 Liviu Dudau wrote: > > > So Arnd seems to agree with me: we should try to get out of architecture > > > specific > > > pci_sys_data and link

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-11 Thread Liviu Dudau
On Thu, Apr 10, 2014 at 09:46:36PM +0100, Arnd Bergmann wrote: > On Thursday 10 April 2014 15:53:04 Liviu Dudau wrote: > > On Thu, Apr 10, 2014 at 03:07:44PM +0100, Arnd Bergmann wrote: > > > > This mirrors how we treat devices: a pci_device has an embedded device, > > > and so on, in other

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-11 Thread Benjamin Herrenschmidt
On Fri, 2014-04-11 at 10:36 +0200, Arnd Bergmann wrote: > > EEH is one big nasty example on powerpc. > > > > Another random one that happens to be hot in my brain right now because > > we just finished debugging it: On powernv, we are just fixing a series > > of bugs caused by the generic code

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-11 Thread Arnd Bergmann
On Friday 11 April 2014 15:01:09 Benjamin Herrenschmidt wrote: > On Thu, 2014-04-10 at 22:46 +0200, Arnd Bergmann wrote: > > > Half of it ;-) > > > > I think it would be better to not have an architecture specific data > > structure, just like it would be better not to have architecture specific

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-11 Thread Arnd Bergmann
On Friday 11 April 2014 15:01:09 Benjamin Herrenschmidt wrote: On Thu, 2014-04-10 at 22:46 +0200, Arnd Bergmann wrote: Half of it ;-) I think it would be better to not have an architecture specific data structure, just like it would be better not to have architecture specific

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-11 Thread Benjamin Herrenschmidt
On Fri, 2014-04-11 at 10:36 +0200, Arnd Bergmann wrote: EEH is one big nasty example on powerpc. Another random one that happens to be hot in my brain right now because we just finished debugging it: On powernv, we are just fixing a series of bugs caused by the generic code trying to

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-11 Thread Liviu Dudau
On Thu, Apr 10, 2014 at 09:46:36PM +0100, Arnd Bergmann wrote: On Thursday 10 April 2014 15:53:04 Liviu Dudau wrote: On Thu, Apr 10, 2014 at 03:07:44PM +0100, Arnd Bergmann wrote: This mirrors how we treat devices: a pci_device has an embedded device, and so on, in other subsystems we

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-11 Thread Arnd Bergmann
On Friday 11 April 2014 10:22:25 Liviu Dudau wrote: On Thu, Apr 10, 2014 at 09:46:36PM +0100, Arnd Bergmann wrote: On Thursday 10 April 2014 15:53:04 Liviu Dudau wrote: So Arnd seems to agree with me: we should try to get out of architecture specific pci_sys_data and link the host

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-10 Thread Benjamin Herrenschmidt
On Thu, 2014-04-10 at 22:46 +0200, Arnd Bergmann wrote: > Half of it ;-) > > I think it would be better to not have an architecture specific data > structure, just like it would be better not to have architecture specific > pcibios_* functions that get called by the PCI core. Note that the >

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-10 Thread Arnd Bergmann
On Thursday 10 April 2014 15:53:04 Liviu Dudau wrote: > On Thu, Apr 10, 2014 at 03:07:44PM +0100, Arnd Bergmann wrote: > > This mirrors how we treat devices: a pci_device has an embedded device, > > and so on, in other subsystems we can have multiple layers. > > > > In this example, the tegra

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-10 Thread Liviu Dudau
On Thu, Apr 10, 2014 at 03:07:44PM +0100, Arnd Bergmann wrote: > On Thursday 10 April 2014 07:50:52 Bjorn Helgaas wrote: > > On Thu, Apr 10, 2014 at 2:00 AM, Arnd Bergmann wrote: > > > On Wednesday 09 April 2014 21:48:14 Bjorn Helgaas wrote: > > >> On Wed, Apr 9, 2014 at 7:27 PM, Liviu Dudau

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-10 Thread Arnd Bergmann
On Thursday 10 April 2014 07:50:52 Bjorn Helgaas wrote: > On Thu, Apr 10, 2014 at 2:00 AM, Arnd Bergmann wrote: > > On Wednesday 09 April 2014 21:48:14 Bjorn Helgaas wrote: > >> On Wed, Apr 9, 2014 at 7:27 PM, Liviu Dudau wrote: > >> > On Wed, Apr 09, 2014 at 08:02:41AM -0600, Bjorn Helgaas

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-10 Thread Bjorn Helgaas
On Thu, Apr 10, 2014 at 2:00 AM, Arnd Bergmann wrote: > On Wednesday 09 April 2014 21:48:14 Bjorn Helgaas wrote: >> On Wed, Apr 9, 2014 at 7:27 PM, Liviu Dudau wrote: >> > On Wed, Apr 09, 2014 at 08:02:41AM -0600, Bjorn Helgaas wrote: >> >> >> struct pci_host_bridge { >> >> >> int domain;

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-10 Thread Arnd Bergmann
On Wednesday 09 April 2014 21:48:14 Bjorn Helgaas wrote: > On Wed, Apr 9, 2014 at 7:27 PM, Liviu Dudau wrote: > > On Wed, Apr 09, 2014 at 08:02:41AM -0600, Bjorn Helgaas wrote: > >> >> struct pci_host_bridge { > >> >> int domain; > >> >> int node; > >> >> struct device *dev; > >> >>

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-10 Thread Arnd Bergmann
On Wednesday 09 April 2014 21:48:14 Bjorn Helgaas wrote: On Wed, Apr 9, 2014 at 7:27 PM, Liviu Dudau li...@dudau.co.uk wrote: On Wed, Apr 09, 2014 at 08:02:41AM -0600, Bjorn Helgaas wrote: struct pci_host_bridge { int domain; int node; struct device *dev; struct

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-10 Thread Bjorn Helgaas
On Thu, Apr 10, 2014 at 2:00 AM, Arnd Bergmann a...@arndb.de wrote: On Wednesday 09 April 2014 21:48:14 Bjorn Helgaas wrote: On Wed, Apr 9, 2014 at 7:27 PM, Liviu Dudau li...@dudau.co.uk wrote: On Wed, Apr 09, 2014 at 08:02:41AM -0600, Bjorn Helgaas wrote: struct pci_host_bridge {

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-10 Thread Arnd Bergmann
On Thursday 10 April 2014 07:50:52 Bjorn Helgaas wrote: On Thu, Apr 10, 2014 at 2:00 AM, Arnd Bergmann a...@arndb.de wrote: On Wednesday 09 April 2014 21:48:14 Bjorn Helgaas wrote: On Wed, Apr 9, 2014 at 7:27 PM, Liviu Dudau li...@dudau.co.uk wrote: On Wed, Apr 09, 2014 at 08:02:41AM

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-10 Thread Liviu Dudau
On Thu, Apr 10, 2014 at 03:07:44PM +0100, Arnd Bergmann wrote: On Thursday 10 April 2014 07:50:52 Bjorn Helgaas wrote: On Thu, Apr 10, 2014 at 2:00 AM, Arnd Bergmann a...@arndb.de wrote: On Wednesday 09 April 2014 21:48:14 Bjorn Helgaas wrote: On Wed, Apr 9, 2014 at 7:27 PM, Liviu Dudau

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-10 Thread Arnd Bergmann
On Thursday 10 April 2014 15:53:04 Liviu Dudau wrote: On Thu, Apr 10, 2014 at 03:07:44PM +0100, Arnd Bergmann wrote: This mirrors how we treat devices: a pci_device has an embedded device, and so on, in other subsystems we can have multiple layers. In this example, the tegra pcie driver

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-10 Thread Benjamin Herrenschmidt
On Thu, 2014-04-10 at 22:46 +0200, Arnd Bergmann wrote: Half of it ;-) I think it would be better to not have an architecture specific data structure, just like it would be better not to have architecture specific pcibios_* functions that get called by the PCI core. Note that the

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-09 Thread Bjorn Helgaas
On Wed, Apr 9, 2014 at 7:27 PM, Liviu Dudau wrote: > On Wed, Apr 09, 2014 at 08:02:41AM -0600, Bjorn Helgaas wrote: >> On Wed, Apr 9, 2014 at 6:07 AM, Liviu Dudau wrote: >> > On Tue, Apr 08, 2014 at 05:28:39PM +0100, Bjorn Helgaas wrote: >> >> On Tue, Apr 8, 2014 at 4:20 AM, Liviu Dudau wrote:

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-09 Thread Liviu Dudau
On Wed, Apr 09, 2014 at 08:02:41AM -0600, Bjorn Helgaas wrote: > On Wed, Apr 9, 2014 at 6:07 AM, Liviu Dudau wrote: > > On Tue, Apr 08, 2014 at 05:28:39PM +0100, Bjorn Helgaas wrote: > >> On Tue, Apr 8, 2014 at 4:20 AM, Liviu Dudau wrote: > >> > On Mon, Apr 07, 2014 at 11:44:51PM +0100, Bjorn

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-09 Thread Benjamin Herrenschmidt
On Wed, 2014-04-09 at 08:02 -0600, Bjorn Helgaas wrote: > It's possible we could manage domain numbers in the core. On ACPI > systems, we currently we use the ACPI _SEG value as the domain. In > some cases, e.g., on ia64, config space access is done via firmware > interfaces, and those

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-09 Thread Arnd Bergmann
On Wednesday 09 April 2014 08:02:41 Bjorn Helgaas wrote: > > It's possible we could manage domain numbers in the core. On ACPI > systems, we currently we use the ACPI _SEG value as the domain. In > some cases, e.g., on ia64, config space access is done via firmware > interfaces, and those

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-09 Thread Bjorn Helgaas
On Wed, Apr 9, 2014 at 6:07 AM, Liviu Dudau wrote: > On Tue, Apr 08, 2014 at 05:28:39PM +0100, Bjorn Helgaas wrote: >> On Tue, Apr 8, 2014 at 4:20 AM, Liviu Dudau wrote: >> > On Mon, Apr 07, 2014 at 11:44:51PM +0100, Bjorn Helgaas wrote: >> >> >> Let me try to explain my concern about the >> >>

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-09 Thread Liviu Dudau
On Tue, Apr 08, 2014 at 05:28:39PM +0100, Bjorn Helgaas wrote: > On Tue, Apr 8, 2014 at 4:20 AM, Liviu Dudau wrote: > > On Mon, Apr 07, 2014 at 11:44:51PM +0100, Bjorn Helgaas wrote: > > >> Let me try to explain my concern about the > >> pci_create_root_bus_in_domain() interface. We currently

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-09 Thread Liviu Dudau
On Tue, Apr 08, 2014 at 05:28:39PM +0100, Bjorn Helgaas wrote: On Tue, Apr 8, 2014 at 4:20 AM, Liviu Dudau liviu.du...@arm.com wrote: On Mon, Apr 07, 2014 at 11:44:51PM +0100, Bjorn Helgaas wrote: Let me try to explain my concern about the pci_create_root_bus_in_domain() interface. We

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-09 Thread Bjorn Helgaas
On Wed, Apr 9, 2014 at 6:07 AM, Liviu Dudau liviu.du...@arm.com wrote: On Tue, Apr 08, 2014 at 05:28:39PM +0100, Bjorn Helgaas wrote: On Tue, Apr 8, 2014 at 4:20 AM, Liviu Dudau liviu.du...@arm.com wrote: On Mon, Apr 07, 2014 at 11:44:51PM +0100, Bjorn Helgaas wrote: Let me try to explain

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-09 Thread Arnd Bergmann
On Wednesday 09 April 2014 08:02:41 Bjorn Helgaas wrote: It's possible we could manage domain numbers in the core. On ACPI systems, we currently we use the ACPI _SEG value as the domain. In some cases, e.g., on ia64, config space access is done via firmware interfaces, and those interfaces

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-09 Thread Benjamin Herrenschmidt
On Wed, 2014-04-09 at 08:02 -0600, Bjorn Helgaas wrote: It's possible we could manage domain numbers in the core. On ACPI systems, we currently we use the ACPI _SEG value as the domain. In some cases, e.g., on ia64, config space access is done via firmware interfaces, and those interfaces

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-09 Thread Liviu Dudau
On Wed, Apr 09, 2014 at 08:02:41AM -0600, Bjorn Helgaas wrote: On Wed, Apr 9, 2014 at 6:07 AM, Liviu Dudau liviu.du...@arm.com wrote: On Tue, Apr 08, 2014 at 05:28:39PM +0100, Bjorn Helgaas wrote: On Tue, Apr 8, 2014 at 4:20 AM, Liviu Dudau liviu.du...@arm.com wrote: On Mon, Apr 07, 2014

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-09 Thread Bjorn Helgaas
On Wed, Apr 9, 2014 at 7:27 PM, Liviu Dudau li...@dudau.co.uk wrote: On Wed, Apr 09, 2014 at 08:02:41AM -0600, Bjorn Helgaas wrote: On Wed, Apr 9, 2014 at 6:07 AM, Liviu Dudau liviu.du...@arm.com wrote: On Tue, Apr 08, 2014 at 05:28:39PM +0100, Bjorn Helgaas wrote: On Tue, Apr 8, 2014 at

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-08 Thread Bjorn Helgaas
On Tue, Apr 8, 2014 at 4:20 AM, Liviu Dudau wrote: > On Mon, Apr 07, 2014 at 11:44:51PM +0100, Bjorn Helgaas wrote: >> Let me try to explain my concern about the >> pci_create_root_bus_in_domain() interface. We currently have these >> interfaces: >> >> pci_scan_root_bus() >> pci_scan_bus()

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-08 Thread Liviu Dudau
On Mon, Apr 07, 2014 at 11:44:51PM +0100, Bjorn Helgaas wrote: > On Mon, Apr 7, 2014 at 4:07 AM, Liviu Dudau wrote: > > On Mon, Apr 07, 2014 at 10:14:18AM +0100, Benjamin Herrenschmidt wrote: > >> On Mon, 2014-04-07 at 09:46 +0100, Liviu Dudau wrote: > >> > > >> > *My* strategy is to get rid of

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-08 Thread Liviu Dudau
On Mon, Apr 07, 2014 at 11:44:51PM +0100, Bjorn Helgaas wrote: On Mon, Apr 7, 2014 at 4:07 AM, Liviu Dudau liviu.du...@arm.com wrote: On Mon, Apr 07, 2014 at 10:14:18AM +0100, Benjamin Herrenschmidt wrote: On Mon, 2014-04-07 at 09:46 +0100, Liviu Dudau wrote: *My* strategy is to get rid

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-08 Thread Bjorn Helgaas
On Tue, Apr 8, 2014 at 4:20 AM, Liviu Dudau liviu.du...@arm.com wrote: On Mon, Apr 07, 2014 at 11:44:51PM +0100, Bjorn Helgaas wrote: Let me try to explain my concern about the pci_create_root_bus_in_domain() interface. We currently have these interfaces: pci_scan_root_bus()

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-07 Thread Bjorn Helgaas
On Mon, Apr 7, 2014 at 4:07 AM, Liviu Dudau wrote: > On Mon, Apr 07, 2014 at 10:14:18AM +0100, Benjamin Herrenschmidt wrote: >> On Mon, 2014-04-07 at 09:46 +0100, Liviu Dudau wrote: >> > >> > *My* strategy is to get rid of pci_domain_nr(). I don't see why we need >> > to have arch specific way of

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-07 Thread Liviu Dudau
On Mon, Apr 07, 2014 at 10:14:18AM +0100, Benjamin Herrenschmidt wrote: > On Mon, 2014-04-07 at 09:46 +0100, Liviu Dudau wrote: > > > > *My* strategy is to get rid of pci_domain_nr(). I don't see why we need > > to have arch specific way of providing the number, specially after looking > > at the

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-07 Thread Benjamin Herrenschmidt
On Mon, 2014-04-07 at 09:46 +0100, Liviu Dudau wrote: > > *My* strategy is to get rid of pci_domain_nr(). I don't see why we need > to have arch specific way of providing the number, specially after looking > at the existing implementations that return a value from a variable that > is never

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-07 Thread Liviu Dudau
On Sat, Apr 05, 2014 at 01:00:07AM +0100, Bjorn Helgaas wrote: > On Fri, Mar 14, 2014 at 03:34:30PM +, Liviu Dudau wrote: > > Make it easier to discover the domain number of a bus by storing > > the number in pci_host_bridge for the root bus. Several architectures > > have their own way of

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-07 Thread Liviu Dudau
On Sat, Apr 05, 2014 at 01:00:07AM +0100, Bjorn Helgaas wrote: On Fri, Mar 14, 2014 at 03:34:30PM +, Liviu Dudau wrote: Make it easier to discover the domain number of a bus by storing the number in pci_host_bridge for the root bus. Several architectures have their own way of storing

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-07 Thread Benjamin Herrenschmidt
On Mon, 2014-04-07 at 09:46 +0100, Liviu Dudau wrote: *My* strategy is to get rid of pci_domain_nr(). I don't see why we need to have arch specific way of providing the number, specially after looking at the existing implementations that return a value from a variable that is never touched

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-07 Thread Liviu Dudau
On Mon, Apr 07, 2014 at 10:14:18AM +0100, Benjamin Herrenschmidt wrote: On Mon, 2014-04-07 at 09:46 +0100, Liviu Dudau wrote: *My* strategy is to get rid of pci_domain_nr(). I don't see why we need to have arch specific way of providing the number, specially after looking at the existing

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-07 Thread Bjorn Helgaas
On Mon, Apr 7, 2014 at 4:07 AM, Liviu Dudau liviu.du...@arm.com wrote: On Mon, Apr 07, 2014 at 10:14:18AM +0100, Benjamin Herrenschmidt wrote: On Mon, 2014-04-07 at 09:46 +0100, Liviu Dudau wrote: *My* strategy is to get rid of pci_domain_nr(). I don't see why we need to have arch specific

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-04 Thread Bjorn Helgaas
On Fri, Mar 14, 2014 at 03:34:30PM +, Liviu Dudau wrote: > Make it easier to discover the domain number of a bus by storing > the number in pci_host_bridge for the root bus. Several architectures > have their own way of storing this information, so it makes sense > to try to unify the code.

Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-04-04 Thread Bjorn Helgaas
On Fri, Mar 14, 2014 at 03:34:30PM +, Liviu Dudau wrote: Make it easier to discover the domain number of a bus by storing the number in pci_host_bridge for the root bus. Several architectures have their own way of storing this information, so it makes sense to try to unify the code. I

[PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-03-14 Thread Liviu Dudau
Make it easier to discover the domain number of a bus by storing the number in pci_host_bridge for the root bus. Several architectures have their own way of storing this information, so it makes sense to try to unify the code. While at this, add a new function that creates a root bus in a given

[PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.

2014-03-14 Thread Liviu Dudau
Make it easier to discover the domain number of a bus by storing the number in pci_host_bridge for the root bus. Several architectures have their own way of storing this information, so it makes sense to try to unify the code. While at this, add a new function that creates a root bus in a given