Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-22 Thread Bjorn Helgaas
On Thu, Oct 22, 2015 at 02:47:42PM +1100, Benjamin Herrenschmidt wrote: > On Wed, 2015-10-21 at 18:27 -0700, David Miller wrote: > > From: Yinghai Lu > > Date: Wed, 21 Oct 2015 11:16:53 -0700 > > > > > otherwise we need to compare res with pbm->mem_space or pbm > > ->mem64_space > > > to get

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-22 Thread Yinghai Lu
On Thu, Oct 22, 2015 at 12:56 PM, Yinghai Lu wrote: > On Wed, Oct 21, 2015 at 6:15 PM, Yinghai Lu wrote: > looks like i mix the use root bus resource with parent bus resource ... > so that still have problem. Now will two version for patch2 and patch3 that will be used to replace patch 2-4 in

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-22 Thread Yinghai Lu
On Wed, Oct 21, 2015 at 6:15 PM, Yinghai Lu wrote: > On Wed, Oct 21, 2015 at 3:59 PM, Yinghai Lu wrote: >> On Wed, Oct 21, 2015 at 3:32 PM, Yinghai Lu wrote: >>> On Wed, Oct 21, 2015 at 11:50 AM, Bjorn Helgaas wrote: Lots of other architectures have both mem32 and mem64 apertures. You

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-22 Thread Yinghai Lu
On Wed, Oct 21, 2015 at 6:15 PM, Yinghai Lu wrote: > On Wed, Oct 21, 2015 at 3:59 PM, Yinghai Lu wrote: >> On Wed, Oct 21, 2015 at 3:32 PM, Yinghai Lu wrote: >>> On Wed, Oct 21, 2015 at 11:50 AM, Bjorn Helgaas

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-22 Thread Yinghai Lu
On Thu, Oct 22, 2015 at 12:56 PM, Yinghai Lu wrote: > On Wed, Oct 21, 2015 at 6:15 PM, Yinghai Lu wrote: > looks like i mix the use root bus resource with parent bus resource ... > so that still have problem. Now will two version for patch2 and patch3

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-22 Thread Bjorn Helgaas
On Thu, Oct 22, 2015 at 02:47:42PM +1100, Benjamin Herrenschmidt wrote: > On Wed, 2015-10-21 at 18:27 -0700, David Miller wrote: > > From: Yinghai Lu > > Date: Wed, 21 Oct 2015 11:16:53 -0700 > > > > > otherwise we need to compare res with pbm->mem_space or pbm > >

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-21 Thread Benjamin Herrenschmidt
On Wed, 2015-10-21 at 18:27 -0700, David Miller wrote: > From: Yinghai Lu > Date: Wed, 21 Oct 2015 11:16:53 -0700 > > > otherwise we need to compare res with pbm->mem_space or pbm > ->mem64_space > > to get direct parent for request_resource_conflict() calling in > >

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-21 Thread Yinghai Lu
On Wed, Oct 21, 2015 at 3:59 PM, Yinghai Lu wrote: > On Wed, Oct 21, 2015 at 3:32 PM, Yinghai Lu wrote: >> On Wed, Oct 21, 2015 at 11:50 AM, Bjorn Helgaas wrote: >>> Lots of other architectures have both mem32 and mem64 apertures. You >>> haven't explained what's unique about sparc yet. Does

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-21 Thread David Miller
From: Yinghai Lu Date: Wed, 21 Oct 2015 11:16:53 -0700 > otherwise we need to compare res with pbm->mem_space or pbm->mem64_space > to get direct parent for request_resource_conflict() calling in > pci_register_legacy_regions(). Right, this is the issue. On sparc64, the cpu physical base

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-21 Thread Yinghai Lu
On Wed, Oct 21, 2015 at 3:32 PM, Yinghai Lu wrote: > On Wed, Oct 21, 2015 at 11:50 AM, Bjorn Helgaas wrote: >> Lots of other architectures have both mem32 and mem64 apertures. You >> haven't explained what's unique about sparc yet. Does >> pci_find_parent_resource() not work on sparc? If not,

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-21 Thread Yinghai Lu
On Wed, Oct 21, 2015 at 11:50 AM, Bjorn Helgaas wrote: > Lots of other architectures have both mem32 and mem64 apertures. You > haven't explained what's unique about sparc yet. Does > pci_find_parent_resource() not work on sparc? If not, is that because the > resource tree looks different on

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-21 Thread Bjorn Helgaas
On Wed, Oct 21, 2015 at 11:16:53AM -0700, Yinghai Lu wrote: > On Tue, Oct 20, 2015 at 7:35 PM, Bjorn Helgaas wrote: > > On Tue, Oct 20, 2015 at 03:30:44PM -0700, Yinghai Lu wrote: > > I doubt I would agree with a change like this, but maybe, if you can > > explain what's unique about the sparc

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-21 Thread Yinghai Lu
On Tue, Oct 20, 2015 at 7:35 PM, Bjorn Helgaas wrote: > On Tue, Oct 20, 2015 at 03:30:44PM -0700, Yinghai Lu wrote: > I doubt I would agree with a change like this, but maybe, if you can > explain what's unique about the sparc architecture that would require > a change like this. Then how about

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-21 Thread Yinghai Lu
On Tue, Oct 20, 2015 at 7:35 PM, Bjorn Helgaas wrote: > On Tue, Oct 20, 2015 at 03:30:44PM -0700, Yinghai Lu wrote: > I doubt I would agree with a change like this, but maybe, if you can > explain what's unique about the sparc architecture that would require > a change like

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-21 Thread Bjorn Helgaas
On Wed, Oct 21, 2015 at 11:16:53AM -0700, Yinghai Lu wrote: > On Tue, Oct 20, 2015 at 7:35 PM, Bjorn Helgaas wrote: > > On Tue, Oct 20, 2015 at 03:30:44PM -0700, Yinghai Lu wrote: > > I doubt I would agree with a change like this, but maybe, if you can > > explain what's

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-21 Thread Yinghai Lu
On Wed, Oct 21, 2015 at 11:50 AM, Bjorn Helgaas wrote: > Lots of other architectures have both mem32 and mem64 apertures. You > haven't explained what's unique about sparc yet. Does > pci_find_parent_resource() not work on sparc? If not, is that because the > resource tree

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-21 Thread Yinghai Lu
On Wed, Oct 21, 2015 at 3:32 PM, Yinghai Lu wrote: > On Wed, Oct 21, 2015 at 11:50 AM, Bjorn Helgaas wrote: >> Lots of other architectures have both mem32 and mem64 apertures. You >> haven't explained what's unique about sparc yet. Does >>

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-21 Thread David Miller
From: Yinghai Lu Date: Wed, 21 Oct 2015 11:16:53 -0700 > otherwise we need to compare res with pbm->mem_space or pbm->mem64_space > to get direct parent for request_resource_conflict() calling in > pci_register_legacy_regions(). Right, this is the issue. On sparc64, the cpu

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-21 Thread Yinghai Lu
On Wed, Oct 21, 2015 at 3:59 PM, Yinghai Lu wrote: > On Wed, Oct 21, 2015 at 3:32 PM, Yinghai Lu wrote: >> On Wed, Oct 21, 2015 at 11:50 AM, Bjorn Helgaas wrote: >>> Lots of other architectures have both mem32 and mem64 apertures. You

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-21 Thread Benjamin Herrenschmidt
On Wed, 2015-10-21 at 18:27 -0700, David Miller wrote: > From: Yinghai Lu > Date: Wed, 21 Oct 2015 11:16:53 -0700 > > > otherwise we need to compare res with pbm->mem_space or pbm > ->mem64_space > > to get direct parent for request_resource_conflict() calling in > >

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-20 Thread Bjorn Helgaas
On Tue, Oct 20, 2015 at 03:30:44PM -0700, Yinghai Lu wrote: > On Tue, Oct 20, 2015 at 3:16 PM, Yinghai Lu wrote: > > On Tue, Oct 20, 2015 at 2:57 PM, Bjorn Helgaas wrote: > >> On Thu, Oct 08, 2015 at 02:38:22PM -0700, Yinghai Lu wrote: > >>> We register regions for legacy and iommu and all have

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-20 Thread Yinghai Lu
On Tue, Oct 20, 2015 at 3:16 PM, Yinghai Lu wrote: > On Tue, Oct 20, 2015 at 2:57 PM, Bjorn Helgaas wrote: >> On Thu, Oct 08, 2015 at 02:38:22PM -0700, Yinghai Lu wrote: >>> We register regions for legacy and iommu and all have open code. >>> >>> Unify them to pci_register_region() and call it

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-20 Thread Yinghai Lu
On Tue, Oct 20, 2015 at 2:57 PM, Bjorn Helgaas wrote: > On Thu, Oct 08, 2015 at 02:38:22PM -0700, Yinghai Lu wrote: >> We register regions for legacy and iommu and all have open code. >> >> Unify them to pci_register_region() and call it accordingly. >> >> + if (!mem_res->flags) >>

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-20 Thread Bjorn Helgaas
On Thu, Oct 08, 2015 at 02:38:22PM -0700, Yinghai Lu wrote: > We register regions for legacy and iommu and all have open code. > > Unify them to pci_register_region() and call it accordingly. > > Signed-off-by: Yinghai Lu > --- > arch/sparc/kernel/pci_common.c | 83 >

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-20 Thread Yinghai Lu
On Tue, Oct 20, 2015 at 3:16 PM, Yinghai Lu wrote: > On Tue, Oct 20, 2015 at 2:57 PM, Bjorn Helgaas wrote: >> On Thu, Oct 08, 2015 at 02:38:22PM -0700, Yinghai Lu wrote: >>> We register regions for legacy and iommu and all have open code. >>> >>> Unify

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-20 Thread Yinghai Lu
On Tue, Oct 20, 2015 at 2:57 PM, Bjorn Helgaas wrote: > On Thu, Oct 08, 2015 at 02:38:22PM -0700, Yinghai Lu wrote: >> We register regions for legacy and iommu and all have open code. >> >> Unify them to pci_register_region() and call it accordingly. >> >> + if

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-20 Thread Bjorn Helgaas
On Thu, Oct 08, 2015 at 02:38:22PM -0700, Yinghai Lu wrote: > We register regions for legacy and iommu and all have open code. > > Unify them to pci_register_region() and call it accordingly. > > Signed-off-by: Yinghai Lu > --- > arch/sparc/kernel/pci_common.c | 83 >

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-20 Thread Bjorn Helgaas
On Tue, Oct 20, 2015 at 03:30:44PM -0700, Yinghai Lu wrote: > On Tue, Oct 20, 2015 at 3:16 PM, Yinghai Lu wrote: > > On Tue, Oct 20, 2015 at 2:57 PM, Bjorn Helgaas wrote: > >> On Thu, Oct 08, 2015 at 02:38:22PM -0700, Yinghai Lu wrote: > >>> We register

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-09 Thread Khalid Aziz
On Thu, 2015-10-08 at 14:38 -0700, Yinghai Lu wrote: > We register regions for legacy and iommu and all have open code. > > Unify them to pci_register_region() and call it accordingly. > > Signed-off-by: Yinghai Lu Tested on sparc platforms Tested-by: Khalid Aziz -- To unsubscribe from

Re: [PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-09 Thread Khalid Aziz
On Thu, 2015-10-08 at 14:38 -0700, Yinghai Lu wrote: > We register regions for legacy and iommu and all have open code. > > Unify them to pci_register_region() and call it accordingly. > > Signed-off-by: Yinghai Lu Tested on sparc platforms Tested-by: Khalid Aziz

[PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-08 Thread Yinghai Lu
We register regions for legacy and iommu and all have open code. Unify them to pci_register_region() and call it accordingly. Signed-off-by: Yinghai Lu --- arch/sparc/kernel/pci_common.c | 83 +++--- 1 file changed, 37 insertions(+), 46 deletions(-) diff

[PATCH v7 03/60] sparc/PCI: Unify pci_register_region()

2015-10-08 Thread Yinghai Lu
We register regions for legacy and iommu and all have open code. Unify them to pci_register_region() and call it accordingly. Signed-off-by: Yinghai Lu --- arch/sparc/kernel/pci_common.c | 83 +++--- 1 file changed, 37 insertions(+), 46