diff mbox series

phb4: Print WOF registers on fence detect

Message ID 20180510021403.12946-1-ruscur@russell.cc
State Accepted
Headers show
Series phb4: Print WOF registers on fence detect | expand

Commit Message

Russell Currey May 10, 2018, 2:14 a.m. UTC
Without the WOF registers it's hard to figure out what went wrong first,
so print those when we print the FIRs when a fence is detected.

Suggested-by: Mike Perez <perezma@us.ibm.com>
Signed-off-by: Russell Currey <ruscur@russell.cc>
---
 hw/phb4.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Vaibhav Jain May 11, 2018, 6:23 a.m. UTC | #1
Russell Currey <ruscur@russell.cc> writes:

> Without the WOF registers it's hard to figure out what went wrong first,
> so print those when we print the FIRs when a fence is detected.
>
> Suggested-by: Mike Perez <perezma@us.ibm.com>
> Signed-off-by: Russell Currey <ruscur@russell.cc>
> ---
Reviewed-by: Vaibhav Jain <vaibhav@linux.ibm.com>

Thanks for this. Will be helpful in debugging EEH on systems where
"pci-eeh-verbose" flag in nvram is not set.
Stewart Smith May 11, 2018, 8:06 p.m. UTC | #2
Russell Currey <ruscur@russell.cc> writes:
> Without the WOF registers it's hard to figure out what went wrong first,
> so print those when we print the FIRs when a fence is detected.
>
> Suggested-by: Mike Perez <perezma@us.ibm.com>
> Signed-off-by: Russell Currey <ruscur@russell.cc>
> ---
>  hw/phb4.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)

thanks, merged to master as of d5d7966431af4c0782a57e81d650f99f14f69a48
diff mbox series

Patch

diff --git a/hw/phb4.c b/hw/phb4.c
index f153ad02..18e1e0f1 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -2369,7 +2369,7 @@  static void phb4_dump_capp_err_regs(struct phb4 *p)
 /* Check if AIB is fenced via PBCQ NFIR */
 static bool phb4_fenced(struct phb4 *p)
 {
-	uint64_t nfir_p, nfir_n, err_aib;
+	uint64_t nfir_p, nfir_p_wof, nfir_n, nfir_n_wof, err_aib;
 	uint64_t err_rpt0, err_rpt1;
 
 	/* Already fenced ? */
@@ -2388,8 +2388,12 @@  static bool phb4_fenced(struct phb4 *p)
 	/* We read the PCI and NEST FIRs and dump them */
 	xscom_read(p->chip_id,
 		   p->pci_stk_xscom + XPEC_PCI_STK_PCI_FIR, &nfir_p);
+	xscom_read(p->chip_id,
+		   p->pci_stk_xscom + XPEC_PCI_STK_PCI_FIR_WOF, &nfir_p_wof);
 	xscom_read(p->chip_id,
 		   p->pe_stk_xscom + XPEC_NEST_STK_PCI_NFIR, &nfir_n);
+	xscom_read(p->chip_id,
+		   p->pe_stk_xscom + XPEC_NEST_STK_PCI_NFIR_WOF, &nfir_n_wof);
 	xscom_read(p->chip_id,
 		   p->pe_stk_xscom + XPEC_NEST_STK_ERR_RPT0, &err_rpt0);
 	xscom_read(p->chip_id,
@@ -2398,7 +2402,9 @@  static bool phb4_fenced(struct phb4 *p)
 		   p->pci_stk_xscom + XPEC_PCI_STK_PBAIB_ERR_REPORT, &err_aib);
 
 	PHBERR(p, "            PCI FIR=%016llx\n", nfir_p);
+	PHBERR(p, "        PCI FIR WOF=%016llx\n", nfir_p_wof);
 	PHBERR(p, "           NEST FIR=%016llx\n", nfir_n);
+	PHBERR(p, "       NEST FIR WOF=%016llx\n", nfir_n_wof);
 	PHBERR(p, "           ERR RPT0=%016llx\n", err_rpt0);
 	PHBERR(p, "           ERR RPT1=%016llx\n", err_rpt1);
 	PHBERR(p, "            AIB ERR=%016llx\n", err_aib);