aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv/pci-ioda.c
diff options
context:
space:
mode:
authorGavin Shan <shangw@linux.vnet.ibm.com>2013-11-04 03:32:46 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-11-05 22:13:51 -0500
commit631ad691b5818291d89af9be607d2fe40be0886e (patch)
treed31a8154a84fa991ad956f48d6e7fe3991aa21fc /arch/powerpc/platforms/powernv/pci-ioda.c
parent80546ac51396bd1d2e37cc78c7bed44c08f90352 (diff)
powerpc/powernv: Add PE to its own PELTV
We need add PE to its own PELTV. Otherwise, the errors originated from the PE might contribute to other PEs. In the result, we can't clear up the error successfully even we're checking and clearing errors during access to PCI config space. Cc: stable@vger.kernel.org Reported-by: kalshett@in.ibm.com Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/powernv/pci-ioda.c')
-rw-r--r--arch/powerpc/platforms/powernv/pci-ioda.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index c639af7d4826..198566e1da71 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -163,13 +163,23 @@ static int pnv_ioda_configure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe)
163 rid_end = pe->rid + 1; 163 rid_end = pe->rid + 1;
164 } 164 }
165 165
166 /* Associate PE in PELT */ 166 /*
167 * Associate PE in PELT. We need add the PE into the
168 * corresponding PELT-V as well. Otherwise, the error
169 * originated from the PE might contribute to other
170 * PEs.
171 */
167 rc = opal_pci_set_pe(phb->opal_id, pe->pe_number, pe->rid, 172 rc = opal_pci_set_pe(phb->opal_id, pe->pe_number, pe->rid,
168 bcomp, dcomp, fcomp, OPAL_MAP_PE); 173 bcomp, dcomp, fcomp, OPAL_MAP_PE);
169 if (rc) { 174 if (rc) {
170 pe_err(pe, "OPAL error %ld trying to setup PELT table\n", rc); 175 pe_err(pe, "OPAL error %ld trying to setup PELT table\n", rc);
171 return -ENXIO; 176 return -ENXIO;
172 } 177 }
178
179 rc = opal_pci_set_peltv(phb->opal_id, pe->pe_number,
180 pe->pe_number, OPAL_ADD_PE_TO_DOMAIN);
181 if (rc)
182 pe_warn(pe, "OPAL error %d adding self to PELTV\n", rc);
173 opal_pci_eeh_freeze_clear(phb->opal_id, pe->pe_number, 183 opal_pci_eeh_freeze_clear(phb->opal_id, pe->pe_number,
174 OPAL_EEH_ACTION_CLEAR_FREEZE_ALL); 184 OPAL_EEH_ACTION_CLEAR_FREEZE_ALL);
175 185