aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2014-09-29 22:38:58 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2014-09-30 03:15:11 -0400
commitd9df1b5da17cd328301def1d2ae2c2df35f3823c (patch)
treeb3701be7f4ec1df56a7e059fb777e2f4d46a0ffc
parent7a062782295a896f697137aacbe23400fbbafa94 (diff)
powerpc/powernv: Clear PAPR error injection registers
The frozen state on one specific PE is probably caused by error injection, which is done with help of PAPR error injection registers. According to the hardware spec, those registers should be cleared automatically after one-shot frozen PE. However, that's not always true, at least on P7IOC of Firebird-L. So we have to clear them before doing PE reset to avoid recursive EEH errors at recovery stage. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/platforms/powernv/eeh-ioda.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c
index 22609f23f455..d6fb90b32525 100644
--- a/arch/powerpc/platforms/powernv/eeh-ioda.c
+++ b/arch/powerpc/platforms/powernv/eeh-ioda.c
@@ -682,6 +682,31 @@ static int ioda_eeh_reset(struct eeh_pe *pe, int option)
682 if (pe->type & EEH_PE_PHB) { 682 if (pe->type & EEH_PE_PHB) {
683 ret = ioda_eeh_phb_reset(hose, option); 683 ret = ioda_eeh_phb_reset(hose, option);
684 } else { 684 } else {
685 struct pnv_phb *phb;
686 s64 rc;
687
688 /*
689 * The frozen PE might be caused by PAPR error injection
690 * registers, which are expected to be cleared after hitting
691 * frozen PE as stated in the hardware spec. Unfortunately,
692 * that's not true on P7IOC. So we have to clear it manually
693 * to avoid recursive EEH errors during recovery.
694 */
695 phb = hose->private_data;
696 if (phb->model == PNV_PHB_MODEL_P7IOC &&
697 (option == EEH_RESET_HOT ||
698 option == EEH_RESET_FUNDAMENTAL)) {
699 rc = opal_pci_reset(phb->opal_id,
700 OPAL_PHB_ERROR,
701 OPAL_ASSERT_RESET);
702 if (rc != OPAL_SUCCESS) {
703 pr_warn("%s: Failure %lld clearing "
704 "error injection registers\n",
705 __func__, rc);
706 return -EIO;
707 }
708 }
709
685 bus = eeh_pe_bus_get(pe); 710 bus = eeh_pe_bus_get(pe);
686 if (pci_is_root_bus(bus) || 711 if (pci_is_root_bus(bus) ||
687 pci_is_root_bus(bus->parent)) 712 pci_is_root_bus(bus->parent))