Skip to content

Commit 2fb3f6e

Browse files
SherrySun5suryasaimadhu
authored andcommitted
EDAC/synopsys: Do not dump uninitialized pinf->col
On the ZynqMP platform, zynqmp_get_error_info() is used to read out error information. In this function, the pinf->col parameter is not used (it is only used by the Zynq platform's zynq_get_error_info()). So there's no need to print pinf->col on ZynqMP. In order to differentiate on which platform handle_error() is executed, use DDR_ECC_INTR_SUPPORT as the check condition to distinguish between Zynq and ZynqMP platforms. [ bp: Massage. ] Fixes: b500b4a ("EDAC, synopsys: Add ECC support for ZynqMP DDR controller") Signed-off-by: Sherry Sun <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Manish Narani <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent fb33c65 commit 2fb3f6e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

drivers/edac/synopsys_edac.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -477,16 +477,16 @@ static void handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p)
477477

478478
if (p->ce_cnt) {
479479
pinf = &p->ceinfo;
480-
if (!priv->p_data->quirks) {
480+
if (priv->p_data->quirks & DDR_ECC_INTR_SUPPORT) {
481481
snprintf(priv->message, SYNPS_EDAC_MSG_SIZE,
482-
"DDR ECC error type:%s Row %d Bank %d Col %d Bit Position: %d Data: 0x%08x",
483-
"CE", pinf->row, pinf->bank, pinf->col,
482+
"DDR ECC error type:%s Row %d Bank %d BankGroup Number %d Block Number %d Bit Position: %d Data: 0x%08x",
483+
"CE", pinf->row, pinf->bank,
484+
pinf->bankgrpnr, pinf->blknr,
484485
pinf->bitpos, pinf->data);
485486
} else {
486487
snprintf(priv->message, SYNPS_EDAC_MSG_SIZE,
487-
"DDR ECC error type:%s Row %d Bank %d Col %d BankGroup Number %d Block Number %d Bit Position: %d Data: 0x%08x",
488+
"DDR ECC error type:%s Row %d Bank %d Col %d Bit Position: %d Data: 0x%08x",
488489
"CE", pinf->row, pinf->bank, pinf->col,
489-
pinf->bankgrpnr, pinf->blknr,
490490
pinf->bitpos, pinf->data);
491491
}
492492

@@ -497,15 +497,15 @@ static void handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p)
497497

498498
if (p->ue_cnt) {
499499
pinf = &p->ueinfo;
500-
if (!priv->p_data->quirks) {
500+
if (priv->p_data->quirks & DDR_ECC_INTR_SUPPORT) {
501501
snprintf(priv->message, SYNPS_EDAC_MSG_SIZE,
502-
"DDR ECC error type :%s Row %d Bank %d Col %d ",
503-
"UE", pinf->row, pinf->bank, pinf->col);
502+
"DDR ECC error type :%s Row %d Bank %d BankGroup Number %d Block Number %d",
503+
"UE", pinf->row, pinf->bank,
504+
pinf->bankgrpnr, pinf->blknr);
504505
} else {
505506
snprintf(priv->message, SYNPS_EDAC_MSG_SIZE,
506-
"DDR ECC error type :%s Row %d Bank %d Col %d BankGroup Number %d Block Number %d",
507-
"UE", pinf->row, pinf->bank, pinf->col,
508-
pinf->bankgrpnr, pinf->blknr);
507+
"DDR ECC error type :%s Row %d Bank %d Col %d ",
508+
"UE", pinf->row, pinf->bank, pinf->col);
509509
}
510510

511511
edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci,

0 commit comments

Comments
 (0)