Skip to contentSkip to conversation

Bug in EDAC error handling of Marvell Armada XP

PATCH Applied Jan Lübbe 3 participants 4 messages Sep 30, 2021 – Oct 14, 2021 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): AM8PR07MB8172B5AB7AD5DAE78CA4624CFEAA9@AM8PR07MB8172.eurprd07.prod.outlook.com

Jan Lübbe

author maintainer
#1 lore raw

Hi Hans,

Quoted 32 lines · Hans (Nokia - DE/Stuttgart)

Hi Jan, all,

we recently discovered strange traces when our system is experiencing ECC errors.

When system is detecting ECC errors it sometimes reports the same amount of CE and UE (correctable and uncorrectable errors) or sometimes even 0 UE. Please see these examples:

EDAC MC0: 3 CE marvell,armada-xp-sdram-controller on any memory ( page:0x0 offset:0x0 grain:8 syndrome:0x0 - details unavailable (multiple errors)) EDAC MC0: 3 UE marvell,armada-xp-sdram-controller on any memory ( page:0x0 offset:0x0 grain:8 - details unavailable (multiple errors))

EDAC MC0: 0 UE marvell,armada-xp-sdram-controller on any memory ( page:0x0 offset:0x0 grain:8 - details unavailable (multiple errors))

While looking at the code we noticed that in the drivers/edac/armada_xp_edac.c file the probably incorrect parameter is passed to the edac_mc_handle_error() function.

Please see the following git diff which should pass the correct parameter

drivers/edac/armada_xp_edac.c +1 -1
index e3e757513d1b..b1f46a974b9e 100644
@@ -178,7 +178,7 @@ static void axp_mc_check(struct mem_ctl_info *mci)
                                      "details unavailable (multiple errors)");
         if (cnt_dbe)
                 edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci,
-                                    cnt_sbe, /* error count */
+                                    cnt_dbe, /* error count */
Quoted 3 lines

                                     0, 0, 0, /* pfn, offset, syndrome */ -1, -1, -1, /* top, mid, low layer */ mci->ctl_name,

Yes, this is a bug and your fix looks correct.

Quoted 4 lines

Currently our system is running kernel version 5.10.49. Investigation showed, that also latest RC still has this bug armada_xp_edac.c - drivers/edac/armada_xp_edac.c - Linux source code (v5.15- rc3) - Bootlin

Were you able to verify that your change fixes the issue? If so, I'd ack a properly formatted patch submission.

I don't have access to the hardware at the moment, so I can't easily test it myself.

Thanks,
Jan

Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#2 lore raw

Hey Jan,

we tested the patch and are able to confirm that it does not have any side effects.
Unfortunately we were not able to reproduce the error trace as we do not have a specific testbench to reproduce these errors.

I will send patch in separate mail.

Is this ok with you?

Best Regards,
Hans

-----Original Message-----
From: Jan Lübbe <[email protected]>
Sent: Thursday, September 30, 2021 4:25 PM
To: Potsch, Hans (Nokia - DE/Stuttgart) <[email protected]>; [email protected]
Cc: Glock, Harald (Nokia - DE/Stuttgart) <[email protected]>
Subject: Re: Bug in EDAC error handling of Marvell Armada XP

Hi Hans,

Quoted 39 lines · Hans (Nokia - DE/Stuttgart)

Hi Jan, all,

we recently discovered strange traces when our system is experiencing ECC errors.

When system is detecting ECC errors it sometimes reports the same amount of CE and UE (correctable and uncorrectable errors) or sometimes even 0 UE. Please see these examples:

EDAC MC0: 3 CE marvell,armada-xp-sdram-controller on any memory ( page:0x0
offset:0x0 grain:8 syndrome:0x0 - details unavailable (multiple errors)) EDAC MC0: 3 UE marvell,armada-xp-sdram-controller on any memory ( page:0x0
offset:0x0 grain:8 - details unavailable (multiple errors))

EDAC MC0: 0 UE marvell,armada-xp-sdram-controller on any memory ( page:0x0
offset:0x0 grain:8 - details unavailable (multiple errors))

While looking at the code we noticed that in the drivers/edac/armada_xp_edac.c file the probably incorrect parameter is passed to the edac_mc_handle_error() function.

Please see the following git diff which should pass the correct parameter diff --git a/drivers/edac/armada_xp_edac.c b/drivers/edac/armada_xp_edac.c index e3e757513d1b..b1f46a974b9e 100644

drivers/edac/armada_xp_edac.c +1 -1
@@ -178,7 +178,7 @@ static void axp_mc_check(struct mem_ctl_info *mci)
                                     "details unavailable (multiple 
 errors)");
        if (cnt_dbe)
                edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci,
-                                    cnt_sbe, /* error count */
+                                    cnt_dbe, /* error count */
                                     0, 0, 0, /* pfn, offset, syndrome 
 */
Quoted 3 lines
                                     -1, -1, -1, /* top, mid, low 
layer */
                                     mci->ctl_name,

Yes, this is a bug and your fix looks correct.

Quoted 5 lines

Currently our system is running kernel version 5.10.49. Investigation showed, that also latest RC still has this bug armada_xp_edac.c - drivers/edac/armada_xp_edac.c - Linux source code (v5.15-
rc3) - Bootlin

Were you able to verify that your change fixes the issue? If so, I'd ack a properly formatted patch submission.

I don't have access to the hardware at the moment, so I can't easily test it myself.

Thanks,
Jan

Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#3 lore raw

PATCH 1/1 EDAC/armada-xp: Fix output of uncorrectable error counter

Incorrect parameter is passed to the edac_mc_handle_error() function. Therefore number of correctable errors is displayed as uncorrectable errors. Changed to correct parameter.

---
 drivers/edac/armada_xp_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/edac/armada_xp_edac.c +1 -1
index e3e757513d1b..b1f46a974b9e 100644
@@ -178,7 +178,7 @@ static void axp_mc_check(struct mem_ctl_info *mci)
 				     "details unavailable (multiple errors)");
 	if (cnt_dbe)
 		edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci,
-				     cnt_sbe, /* error count */
+				     cnt_dbe, /* error count */
 				     0, 0, 0, /* pfn, offset, syndrome */
 				     -1, -1, -1, /* top, mid, low layer */
 				     mci->ctl_name,
Signature · 1 line
2.32.0
maintainer Applied
#4 lore raw

Re: [PATCH] EDAC/armada-xp: Fix output of uncorrectable error counter

Quoted 15 lines · Hans Potsch

Incorrect parameter is passed to the edac_mc_handle_error() function. Therefore number of correctable errors is displayed as uncorrectable errors. Changed to correct parameter.

---
 drivers/edac/armada_xp_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/edac/armada_xp_edac.c +0 -0
index e3e757513d1b..b1f46a974b9e 100644

drivers/edac/armada_xp_edac.c static void axp_mc_check(struct mem_ctl_info *mci) · line 184

Quoted 8 lines
drivers/edac/armada_xp_edac.c +1 -1
@@ -178,7 +178,7 @@ static void axp_mc_check(struct mem_ctl_info *mci)
 				     "details unavailable (multiple errors)");
 	if (cnt_dbe)
 		edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci,
-				     cnt_sbe, /* error count */
+				     cnt_dbe, /* error count */
 				     0, 0, 0, /* pfn, offset, syndrome */
 				     -1, -1, -1, /* top, mid, low layer */
 				     mci->ctl_name,

Applied, thanks.

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette