linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhenzhong Duan <zhenzhong.duan@gmail.com>
To: linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org
Cc: tony.luck@intel.com, bp@alien8.de, mchehab@kernel.org,
	james.morse@arm.com, rrichter@marvell.com,
	Zhenzhong Duan <zhenzhong.duan@gmail.com>
Subject: [PATCH] EDAC/mc: call edac_inc_ue_error() before panic
Date: Wed, 10 Jun 2020 14:58:46 +0800	[thread overview]
Message-ID: <20200610065846.3626-2-zhenzhong.duan@gmail.com> (raw)
In-Reply-To: <20200610065846.3626-1-zhenzhong.duan@gmail.com>

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

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com>
---
 drivers/edac/edac_mc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 75ede27..c1f23c2 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -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)
-- 
1.8.3.1


  reply	other threads:[~2020-06-10  6:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10  6:58 [PATCH] EDAC, pnd2: set MCE_PRIO_EDAC priority for pnd2_mce_dec notifier Zhenzhong Duan
2020-06-10  6:58 ` Zhenzhong Duan [this message]
2020-06-10 17:19   ` [PATCH] EDAC/mc: call edac_inc_ue_error() before panic Luck, Tony
2020-06-11  2:37     ` Zhenzhong Duan
2020-06-10 17:16 ` [PATCH] EDAC, pnd2: set MCE_PRIO_EDAC priority for pnd2_mce_dec notifier Luck, Tony

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200610065846.3626-2-zhenzhong.duan@gmail.com \
    --to=zhenzhong.duan@gmail.com \
    --cc=bp@alien8.de \
    --cc=james.morse@arm.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rrichter@marvell.com \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).