diff mbox

[3/3] powerpc/powernv: Don't configure IO window on PHB3

Message ID 1367847858-6506-3-git-send-email-shangw@linux.vnet.ibm.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Gavin Shan May 6, 2013, 1:44 p.m. UTC
We needn't configure IO windows for the corresponding PEs on PHB3
since that doesn't support IO.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/powernv/pci-ioda.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Comments

Benjamin Herrenschmidt May 6, 2013, 9:34 p.m. UTC | #1
On Mon, 2013-05-06 at 21:44 +0800, Gavin Shan wrote:
> We needn't configure IO windows for the corresponding PEs on PHB3
> since that doesn't support IO.

Here too, no need for such a flag, just check that
pci_controller->io_resource.flags is 0.

BTW. Please work on top of the patch I sent already that avoids adding
bogus resources to pci_host_bridge when their flags are 0. I'll send
it to Linus today.

Cheers,
Ben.

> Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
> ---
>  arch/powerpc/platforms/powernv/pci-ioda.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
> index 0c3fa29..b4f3edb 100644
> --- a/arch/powerpc/platforms/powernv/pci-ioda.c
> +++ b/arch/powerpc/platforms/powernv/pci-ioda.c
> @@ -894,7 +894,9 @@ static void pnv_ioda_setup_pe_seg(struct pci_controller *hose,
>  		    res->start > res->end)
>  			continue;
>  
> -		if (res->flags & IORESOURCE_IO) {
> +		/* We needn't setup IO windows for PHB3 */
> +		if (!(pe->pbus->bus_flags & PCI_BUS_FLAGS_NO_IO) &&
> +		    res->flags & IORESOURCE_IO) {
>  			region.start = res->start - phb->ioda.io_pci_base;
>  			region.end   = res->end - phb->ioda.io_pci_base;
>  			index = region.start / phb->ioda.io_segsize;


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 0c3fa29..b4f3edb 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -894,7 +894,9 @@  static void pnv_ioda_setup_pe_seg(struct pci_controller *hose,
 		    res->start > res->end)
 			continue;
 
-		if (res->flags & IORESOURCE_IO) {
+		/* We needn't setup IO windows for PHB3 */
+		if (!(pe->pbus->bus_flags & PCI_BUS_FLAGS_NO_IO) &&
+		    res->flags & IORESOURCE_IO) {
 			region.start = res->start - phb->ioda.io_pci_base;
 			region.end   = res->end - phb->ioda.io_pci_base;
 			index = region.start / phb->ioda.io_segsize;