From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Gavin Shan <shangw@linux.vnet.ibm.com>
Cc: yinghai@kernel.org, linux-pci@vger.kernel.org,
bhelgaas@google.com, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 3/3] powerpc/powernv: Don't configure IO window on PHB3
Date: Tue, 07 May 2013 07:34:30 +1000 [thread overview]
Message-ID: <1367876070.15842.60.camel@pasglop> (raw)
In-Reply-To: <1367847858-6506-3-git-send-email-shangw@linux.vnet.ibm.com>
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;
next prev parent reply other threads:[~2013-05-06 21:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-06 13:44 [PATCH 1/3] PCI: PCI_BUS_FLAGS_NO_IO flag for PCI bus Gavin Shan
2013-05-06 13:44 ` [PATCH 2/3] powerpc/powernv: Disable IO space for PCI buses Gavin Shan
2013-05-06 21:33 ` Benjamin Herrenschmidt
2013-05-07 5:11 ` Gavin Shan
2013-05-06 13:44 ` [PATCH 3/3] powerpc/powernv: Don't configure IO window on PHB3 Gavin Shan
2013-05-06 21:34 ` Benjamin Herrenschmidt [this message]
2013-05-07 5:12 ` Gavin Shan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1367876070.15842.60.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=shangw@linux.vnet.ibm.com \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).