Skip to contentSkip to conversation

EDAC, pnd2: set MCE_PRIO_EDAC priority for pnd2_mce_dec notifier

PATCH In review Zhenzhong Duan 2 participants 5 messages Jun 10, 2020 – Jun 11, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 EDAC, pnd2: set MCE_PRIO_EDAC priority for pnd2_mce_dec notifier

...or else it has MCE_PRIO_LOWEST priority by default.

---
 drivers/edac/pnd2_edac.c | 1 +
 1 file changed, 1 insertion(+)
drivers/edac/pnd2_edac.c +1 -0
index bc47328..368fae3 100644
@@ -1434,6 +1434,7 @@ static int pnd2_mce_check_error(struct notifier_block *nb, unsigned long val, vo
 
 static struct notifier_block pnd2_mce_dec = {
 	.notifier_call	= pnd2_mce_check_error,
+	.priority	= MCE_PRIO_EDAC,
 };
 
 #ifdef CONFIG_EDAC_DEBUG
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/1 EDAC/mc: call edac_inc_ue_error() before panic

By calling edac_inc_ue_error() before panic, we get a correct UE error count for core dump analysis.

---
 drivers/edac/edac_mc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/edac/edac_mc.c +2 -2
index 75ede27..c1f23c2 100644
@@ -1011,6 +1011,8 @@ static void edac_ue_error(struct edac_raw_error_desc *e)
 			e->other_detail);
 	}
 
+	edac_inc_ue_error(e);
+
 	if (edac_mc_get_panic_on_ue()) {
 		panic("UE %s%son %s (%s page:0x%lx offset:0x%lx grain:%ld%s%s)\n",
 			e->msg,
@@ -1020,8 +1022,6 @@ static void edac_ue_error(struct edac_raw_error_desc *e)
 			*e->other_detail ? " - " : "",
 			e->other_detail);
 	}
-
-	edac_inc_ue_error(e);
 }
 
 static void edac_inc_csrow(struct edac_raw_error_desc *e, int row, int chan)
Signature · 1 line
1.8.3.1
maintainer
#2 lore raw

Re: [PATCH] EDAC/mc: call edac_inc_ue_error() before panic

Quoted 2 lines · Zhenzhong Duan

By calling edac_inc_ue_error() before panic, we get a correct UE error count for core dump analysis.

Looks accurate, and I'll add the patch to be applied. But I wonder how big a problem it is. Isn't most of the information deriveable from the panic message?

Quoted 31 lines
---
 drivers/edac/edac_mc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/edac/edac_mc.c +2 -2
index 75ede27..c1f23c2 100644
@@ -1011,6 +1011,8 @@ static void edac_ue_error(struct edac_raw_error_desc *e)
 			e->other_detail);
 	}
 
+	edac_inc_ue_error(e);
+
 	if (edac_mc_get_panic_on_ue()) {
 		panic("UE %s%son %s (%s page:0x%lx offset:0x%lx grain:%ld%s%s)\n",
 			e->msg,
@@ -1020,8 +1022,6 @@ static void edac_ue_error(struct edac_raw_error_desc *e)
 			*e->other_detail ? " - " : "",
 			e->other_detail);
 	}
-
-	edac_inc_ue_error(e);
 }
 
 static void edac_inc_csrow(struct edac_raw_error_desc *e, int row, int chan)
Signature · 1 line
1.8.3.1
#3 lore raw

Re: [PATCH] EDAC/mc: call edac_inc_ue_error() before panic

Quoted 8 lines · Tony
Quoted 2 lines · Zhenzhong Duan

By calling edac_inc_ue_error() before panic, we get a correct UE error count for core dump analysis.

Looks accurate, and I'll add the patch to be applied. But I wonder how big a problem it is. Isn't most of the information deriveable from the panic message?

Thanks for review.
Yes, it's totally not a problem. I'm a little too strict here.

Zhenzhong

maintainer
#4 lore raw
In reply to Zhenzhong Duan
Quoted 13 lines · Zhenzhong Duan

...or else it has MCE_PRIO_LOWEST priority by default.

---
 drivers/edac/pnd2_edac.c | 1 +
 1 file changed, 1 insertion(+)
drivers/edac/pnd2_edac.c +0 -0
index bc47328..368fae3 100644

drivers/edac/pnd2_edac.c static int pnd2_mce_check_error(struct notifier_block *nb, unsigned long val, vo · line 1440

Quoted 7 lines
drivers/edac/pnd2_edac.c +1 -0
@@ -1434,6 +1434,7 @@ static int pnd2_mce_check_error(struct notifier_block *nb, unsigned long val, vo
 
 static struct notifier_block pnd2_mce_dec = {
 	.notifier_call	= pnd2_mce_check_error,
+	.priority	= MCE_PRIO_EDAC,
 };
 
 #ifdef CONFIG_EDAC_DEBUG

Looks OK. I'll queue this next week (after Linus releases v5.8-rc1). It should be merged into v5.9

Thanks

-Tony