aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGavin Shan <shangw@linux.vnet.ibm.com>2013-11-04 03:32:46 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-29 14:11:51 -0500
commit36cfdef6ffa08c5f3b1f812332eddd8aa4d91ed2 (patch)
tree531ea7673745c0b11fdb1c941096e0c13b3d7db5
parenta2db1eb6794f761bc90ae128c0694874bf572579 (diff)
powerpc/powernv: Add PE to its own PELTV
commit 631ad691b5818291d89af9be607d2fe40be0886e upstream. 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. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 7816beff1db8..f75607c93e8a 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -151,13 +151,23 @@ static int pnv_ioda_configure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe)
151 rid_end = pe->rid + 1; 151 rid_end = pe->rid + 1;
152 } 152 }
153 153
154 /* Associate PE in PELT */ 154 /*
155 * Associate PE in PELT. We need add the PE into the
156 * corresponding PELT-V as well. Otherwise, the error
157 * originated from the PE might contribute to other
158 * PEs.
159 */
155 rc = opal_pci_set_pe(phb->opal_id, pe->pe_number, pe->rid, 160 rc = opal_pci_set_pe(phb->opal_id, pe->pe_number, pe->rid,
156 bcomp, dcomp, fcomp, OPAL_MAP_PE); 161 bcomp, dcomp, fcomp, OPAL_MAP_PE);
157 if (rc) { 162 if (rc) {
158 pe_err(pe, "OPAL error %ld trying to setup PELT table\n", rc); 163 pe_err(pe, "OPAL error %ld trying to setup PELT table\n", rc);
159 return -ENXIO; 164 return -ENXIO;
160 } 165 }
166
167 rc = opal_pci_set_peltv(phb->opal_id, pe->pe_number,
168 pe->pe_number, OPAL_ADD_PE_TO_DOMAIN);
169 if (rc)
170 pe_warn(pe, "OPAL error %d adding self to PELTV\n", rc);
161 opal_pci_eeh_freeze_clear(phb->opal_id, pe->pe_number, 171 opal_pci_eeh_freeze_clear(phb->opal_id, pe->pe_number,
162 OPAL_EEH_ACTION_CLEAR_FREEZE_ALL); 172 OPAL_EEH_ACTION_CLEAR_FREEZE_ALL);
163 173