From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: Gavin Shan <gwshan@linux.vnet.ibm.com>
Cc: linuxppc-dev@ozlabs.org, mpe@ellerman.id.au
Subject: Re: [PATCH] powerpc/powernv: Exclude MSI region in extended bridge window
Date: Tue, 21 Jun 2016 12:43:57 +1000 [thread overview]
Message-ID: <20160621024357.GA13672@gwshan> (raw)
In-Reply-To: <1466476865-13425-1-git-send-email-gwshan@linux.vnet.ibm.com>
On Tue, Jun 21, 2016 at 12:41:05PM +1000, Gavin Shan wrote:
>The windows of root port and bridge behind that are extended to
>the PHB's windows to accomodate the PCI hotplug happening in
>future. The PHB's 64KB 32-bits MSI region is included in bridge's
>M32 windows (in hardware) though it's excluded in the corresponding
>resource, as the bridge's M32 windows have 1MB as their minimal
>alignment. We observed EEH error during system boot when the MSI
>region is included in bridge's M32 window.
>
>This excludes top 1MB (including 64KB 32-bits MSI region) region
>from bridge's M32 windows when extending them.
>
>Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
>---
> arch/powerpc/platforms/powernv/pci-ioda.c | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
Michael, I saw the PCI hotplug patches have been merged to your "test"
branch. This one is the fix for EEH error found on Garrison platform.
Please apply it on top of that series.
Thanks,
Gavin
>diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
>index bde7f76..e0a8a92 100644
>--- a/arch/powerpc/platforms/powernv/pci-ioda.c
>+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
>@@ -3239,6 +3239,7 @@ static void pnv_pci_fixup_bridge_resources(struct pci_bus *bus,
> struct pnv_phb *phb = hose->private_data;
> struct pci_dev *bridge = bus->self;
> struct resource *r, *w;
>+ bool msi_region = false;
> int i;
>
> /* Check if we need apply fixup to the bridge's windows */
>@@ -3259,11 +3260,25 @@ static void pnv_pci_fixup_bridge_resources(struct pci_bus *bus,
> (type & IORESOURCE_PREFETCH) &&
> phb->ioda.m64_segsize)
> w = &hose->mem_resources[1];
>- else if (r->flags & type & IORESOURCE_MEM)
>+ else if (r->flags & type & IORESOURCE_MEM) {
> w = &hose->mem_resources[0];
>+ msi_region = true;
>+ }
>
> r->start = w->start;
> r->end = w->end;
>+
>+ /* The 64KB 32-bits MSI region shouldn't be included in
>+ * the 32-bits bridge window. Otherwise, we can see strange
>+ * issues. One of them is EEH error observed on Garrison.
>+ *
>+ * Exclude top 1MB region which is the minimal alignment of
>+ * 32-bits bridge window.
>+ */
>+ if (msi_region) {
>+ r->end += 0x10000;
>+ r->end -= 0x100000;
>+ }
> }
> }
>
>--
>2.1.0
>
next prev parent reply other threads:[~2016-06-21 2:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-21 2:41 [PATCH] powerpc/powernv: Exclude MSI region in extended bridge window Gavin Shan
2016-06-21 2:43 ` Gavin Shan [this message]
2016-06-21 4:30 ` Michael Ellerman
2016-06-21 6:04 ` 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=20160621024357.GA13672@gwshan \
--to=gwshan@linux.vnet.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpe@ellerman.id.au \
/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).