Commit b34497d1 authored by Gavin Shan's avatar Gavin Shan Committed by Benjamin Herrenschmidt

powerpc/powernv: Remove fields in PHB diag-data dump

For some fields (e.g. LEM, MMIO, DMA) in PHB diag-data dump, it's
meaningless to print them if they have non-zero value in the
corresponding mask registers because we always have non-zero values
in the mask registers. The patch only prints those fieds if we
have non-zero values in the primary registers (e.g. LEM, MMIO, DMA
status) so that we can save couple of lines. The patch also removes
unnecessary spare line before "brdgCtl:" and two leading spaces as
prefix in each line as Ben suggested.
Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent f5bc6b70
...@@ -131,65 +131,60 @@ static void pnv_pci_dump_p7ioc_diag_data(struct pci_controller *hose, ...@@ -131,65 +131,60 @@ static void pnv_pci_dump_p7ioc_diag_data(struct pci_controller *hose,
int i; int i;
data = (struct OpalIoP7IOCPhbErrorData *)common; data = (struct OpalIoP7IOCPhbErrorData *)common;
pr_info("P7IOC PHB#%d Diag-data (Version: %d)\n\n", pr_info("P7IOC PHB#%d Diag-data (Version: %d)\n",
hose->global_number, common->version); hose->global_number, common->version);
if (data->brdgCtl) if (data->brdgCtl)
pr_info(" brdgCtl: %08x\n", pr_info("brdgCtl: %08x\n",
data->brdgCtl); data->brdgCtl);
if (data->portStatusReg || data->rootCmplxStatus || if (data->portStatusReg || data->rootCmplxStatus ||
data->busAgentStatus) data->busAgentStatus)
pr_info(" UtlSts: %08x %08x %08x\n", pr_info("UtlSts: %08x %08x %08x\n",
data->portStatusReg, data->rootCmplxStatus, data->portStatusReg, data->rootCmplxStatus,
data->busAgentStatus); data->busAgentStatus);
if (data->deviceStatus || data->slotStatus || if (data->deviceStatus || data->slotStatus ||
data->linkStatus || data->devCmdStatus || data->linkStatus || data->devCmdStatus ||
data->devSecStatus) data->devSecStatus)
pr_info(" RootSts: %08x %08x %08x %08x %08x\n", pr_info("RootSts: %08x %08x %08x %08x %08x\n",
data->deviceStatus, data->slotStatus, data->deviceStatus, data->slotStatus,
data->linkStatus, data->devCmdStatus, data->linkStatus, data->devCmdStatus,
data->devSecStatus); data->devSecStatus);
if (data->rootErrorStatus || data->uncorrErrorStatus || if (data->rootErrorStatus || data->uncorrErrorStatus ||
data->corrErrorStatus) data->corrErrorStatus)
pr_info(" RootErrSts: %08x %08x %08x\n", pr_info("RootErrSts: %08x %08x %08x\n",
data->rootErrorStatus, data->uncorrErrorStatus, data->rootErrorStatus, data->uncorrErrorStatus,
data->corrErrorStatus); data->corrErrorStatus);
if (data->tlpHdr1 || data->tlpHdr2 || if (data->tlpHdr1 || data->tlpHdr2 ||
data->tlpHdr3 || data->tlpHdr4) data->tlpHdr3 || data->tlpHdr4)
pr_info(" RootErrLog: %08x %08x %08x %08x\n", pr_info("RootErrLog: %08x %08x %08x %08x\n",
data->tlpHdr1, data->tlpHdr2, data->tlpHdr1, data->tlpHdr2,
data->tlpHdr3, data->tlpHdr4); data->tlpHdr3, data->tlpHdr4);
if (data->sourceId || data->errorClass || if (data->sourceId || data->errorClass ||
data->correlator) data->correlator)
pr_info(" RootErrLog1: %08x %016llx %016llx\n", pr_info("RootErrLog1: %08x %016llx %016llx\n",
data->sourceId, data->errorClass, data->sourceId, data->errorClass,
data->correlator); data->correlator);
if (data->p7iocPlssr || data->p7iocCsr) if (data->p7iocPlssr || data->p7iocCsr)
pr_info(" PhbSts: %016llx %016llx\n", pr_info("PhbSts: %016llx %016llx\n",
data->p7iocPlssr, data->p7iocCsr); data->p7iocPlssr, data->p7iocCsr);
if (data->lemFir || data->lemErrorMask || if (data->lemFir)
data->lemWOF) pr_info("Lem: %016llx %016llx %016llx\n",
pr_info(" Lem: %016llx %016llx %016llx\n",
data->lemFir, data->lemErrorMask, data->lemFir, data->lemErrorMask,
data->lemWOF); data->lemWOF);
if (data->phbErrorStatus || data->phbFirstErrorStatus || if (data->phbErrorStatus)
data->phbErrorLog0 || data->phbErrorLog1) pr_info("PhbErr: %016llx %016llx %016llx %016llx\n",
pr_info(" PhbErr: %016llx %016llx %016llx %016llx\n",
data->phbErrorStatus, data->phbFirstErrorStatus, data->phbErrorStatus, data->phbFirstErrorStatus,
data->phbErrorLog0, data->phbErrorLog1); data->phbErrorLog0, data->phbErrorLog1);
if (data->mmioErrorStatus || data->mmioFirstErrorStatus || if (data->mmioErrorStatus)
data->mmioErrorLog0 || data->mmioErrorLog1) pr_info("OutErr: %016llx %016llx %016llx %016llx\n",
pr_info(" OutErr: %016llx %016llx %016llx %016llx\n",
data->mmioErrorStatus, data->mmioFirstErrorStatus, data->mmioErrorStatus, data->mmioFirstErrorStatus,
data->mmioErrorLog0, data->mmioErrorLog1); data->mmioErrorLog0, data->mmioErrorLog1);
if (data->dma0ErrorStatus || data->dma0FirstErrorStatus || if (data->dma0ErrorStatus)
data->dma0ErrorLog0 || data->dma0ErrorLog1) pr_info("InAErr: %016llx %016llx %016llx %016llx\n",
pr_info(" InAErr: %016llx %016llx %016llx %016llx\n",
data->dma0ErrorStatus, data->dma0FirstErrorStatus, data->dma0ErrorStatus, data->dma0FirstErrorStatus,
data->dma0ErrorLog0, data->dma0ErrorLog1); data->dma0ErrorLog0, data->dma0ErrorLog1);
if (data->dma1ErrorStatus || data->dma1FirstErrorStatus || if (data->dma1ErrorStatus)
data->dma1ErrorLog0 || data->dma1ErrorLog1) pr_info("InBErr: %016llx %016llx %016llx %016llx\n",
pr_info(" InBErr: %016llx %016llx %016llx %016llx\n",
data->dma1ErrorStatus, data->dma1FirstErrorStatus, data->dma1ErrorStatus, data->dma1FirstErrorStatus,
data->dma1ErrorLog0, data->dma1ErrorLog1); data->dma1ErrorLog0, data->dma1ErrorLog1);
...@@ -198,7 +193,7 @@ static void pnv_pci_dump_p7ioc_diag_data(struct pci_controller *hose, ...@@ -198,7 +193,7 @@ static void pnv_pci_dump_p7ioc_diag_data(struct pci_controller *hose,
(data->pestB[i] >> 63) == 0) (data->pestB[i] >> 63) == 0)
continue; continue;
pr_info(" PE[%3d] A/B: %016llx %016llx\n", pr_info("PE[%3d] A/B: %016llx %016llx\n",
i, data->pestA[i], data->pestB[i]); i, data->pestA[i], data->pestB[i]);
} }
} }
...@@ -210,69 +205,63 @@ static void pnv_pci_dump_phb3_diag_data(struct pci_controller *hose, ...@@ -210,69 +205,63 @@ static void pnv_pci_dump_phb3_diag_data(struct pci_controller *hose,
int i; int i;
data = (struct OpalIoPhb3ErrorData*)common; data = (struct OpalIoPhb3ErrorData*)common;
pr_info("PHB3 PHB#%d Diag-data (Version: %d)\n\n", pr_info("PHB3 PHB#%d Diag-data (Version: %d)\n",
hose->global_number, common->version); hose->global_number, common->version);
if (data->brdgCtl) if (data->brdgCtl)
pr_info(" brdgCtl: %08x\n", pr_info("brdgCtl: %08x\n",
data->brdgCtl); data->brdgCtl);
if (data->portStatusReg || data->rootCmplxStatus || if (data->portStatusReg || data->rootCmplxStatus ||
data->busAgentStatus) data->busAgentStatus)
pr_info(" UtlSts: %08x %08x %08x\n", pr_info("UtlSts: %08x %08x %08x\n",
data->portStatusReg, data->rootCmplxStatus, data->portStatusReg, data->rootCmplxStatus,
data->busAgentStatus); data->busAgentStatus);
if (data->deviceStatus || data->slotStatus || if (data->deviceStatus || data->slotStatus ||
data->linkStatus || data->devCmdStatus || data->linkStatus || data->devCmdStatus ||
data->devSecStatus) data->devSecStatus)
pr_info(" RootSts: %08x %08x %08x %08x %08x\n", pr_info("RootSts: %08x %08x %08x %08x %08x\n",
data->deviceStatus, data->slotStatus, data->deviceStatus, data->slotStatus,
data->linkStatus, data->devCmdStatus, data->linkStatus, data->devCmdStatus,
data->devSecStatus); data->devSecStatus);
if (data->rootErrorStatus || data->uncorrErrorStatus || if (data->rootErrorStatus || data->uncorrErrorStatus ||
data->corrErrorStatus) data->corrErrorStatus)
pr_info(" RootErrSts: %08x %08x %08x\n", pr_info("RootErrSts: %08x %08x %08x\n",
data->rootErrorStatus, data->uncorrErrorStatus, data->rootErrorStatus, data->uncorrErrorStatus,
data->corrErrorStatus); data->corrErrorStatus);
if (data->tlpHdr1 || data->tlpHdr2 || if (data->tlpHdr1 || data->tlpHdr2 ||
data->tlpHdr3 || data->tlpHdr4) data->tlpHdr3 || data->tlpHdr4)
pr_info(" RootErrLog: %08x %08x %08x %08x\n", pr_info("RootErrLog: %08x %08x %08x %08x\n",
data->tlpHdr1, data->tlpHdr2, data->tlpHdr1, data->tlpHdr2,
data->tlpHdr3, data->tlpHdr4); data->tlpHdr3, data->tlpHdr4);
if (data->sourceId || data->errorClass || if (data->sourceId || data->errorClass ||
data->correlator) data->correlator)
pr_info(" RootErrLog1: %08x %016llx %016llx\n", pr_info("RootErrLog1: %08x %016llx %016llx\n",
data->sourceId, data->errorClass, data->sourceId, data->errorClass,
data->correlator); data->correlator);
if (data->nFir || data->nFirMask || if (data->nFir)
data->nFirWOF) pr_info("nFir: %016llx %016llx %016llx\n",
pr_info(" nFir: %016llx %016llx %016llx\n",
data->nFir, data->nFirMask, data->nFir, data->nFirMask,
data->nFirWOF); data->nFirWOF);
if (data->phbPlssr || data->phbCsr) if (data->phbPlssr || data->phbCsr)
pr_info(" PhbSts: %016llx %016llx\n", pr_info("PhbSts: %016llx %016llx\n",
data->phbPlssr, data->phbCsr); data->phbPlssr, data->phbCsr);
if (data->lemFir || data->lemErrorMask || if (data->lemFir)
data->lemWOF) pr_info("Lem: %016llx %016llx %016llx\n",
pr_info(" Lem: %016llx %016llx %016llx\n",
data->lemFir, data->lemErrorMask, data->lemFir, data->lemErrorMask,
data->lemWOF); data->lemWOF);
if (data->phbErrorStatus || data->phbFirstErrorStatus || if (data->phbErrorStatus)
data->phbErrorLog0 || data->phbErrorLog1) pr_info("PhbErr: %016llx %016llx %016llx %016llx\n",
pr_info(" PhbErr: %016llx %016llx %016llx %016llx\n",
data->phbErrorStatus, data->phbFirstErrorStatus, data->phbErrorStatus, data->phbFirstErrorStatus,
data->phbErrorLog0, data->phbErrorLog1); data->phbErrorLog0, data->phbErrorLog1);
if (data->mmioErrorStatus || data->mmioFirstErrorStatus || if (data->mmioErrorStatus)
data->mmioErrorLog0 || data->mmioErrorLog1) pr_info("OutErr: %016llx %016llx %016llx %016llx\n",
pr_info(" OutErr: %016llx %016llx %016llx %016llx\n",
data->mmioErrorStatus, data->mmioFirstErrorStatus, data->mmioErrorStatus, data->mmioFirstErrorStatus,
data->mmioErrorLog0, data->mmioErrorLog1); data->mmioErrorLog0, data->mmioErrorLog1);
if (data->dma0ErrorStatus || data->dma0FirstErrorStatus || if (data->dma0ErrorStatus)
data->dma0ErrorLog0 || data->dma0ErrorLog1) pr_info("InAErr: %016llx %016llx %016llx %016llx\n",
pr_info(" InAErr: %016llx %016llx %016llx %016llx\n",
data->dma0ErrorStatus, data->dma0FirstErrorStatus, data->dma0ErrorStatus, data->dma0FirstErrorStatus,
data->dma0ErrorLog0, data->dma0ErrorLog1); data->dma0ErrorLog0, data->dma0ErrorLog1);
if (data->dma1ErrorStatus || data->dma1FirstErrorStatus || if (data->dma1ErrorStatus)
data->dma1ErrorLog0 || data->dma1ErrorLog1) pr_info("InBErr: %016llx %016llx %016llx %016llx\n",
pr_info(" InBErr: %016llx %016llx %016llx %016llx\n",
data->dma1ErrorStatus, data->dma1FirstErrorStatus, data->dma1ErrorStatus, data->dma1FirstErrorStatus,
data->dma1ErrorLog0, data->dma1ErrorLog1); data->dma1ErrorLog0, data->dma1ErrorLog1);
...@@ -281,7 +270,7 @@ static void pnv_pci_dump_phb3_diag_data(struct pci_controller *hose, ...@@ -281,7 +270,7 @@ static void pnv_pci_dump_phb3_diag_data(struct pci_controller *hose,
(data->pestB[i] >> 63) == 0) (data->pestB[i] >> 63) == 0)
continue; continue;
pr_info(" PE[%3d] A/B: %016llx %016llx\n", pr_info("PE[%3d] A/B: %016llx %016llx\n",
i, data->pestA[i], data->pestB[i]); i, data->pestA[i], data->pestB[i]);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment