linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shiju Jose <shiju.jose@huawei.com>
To: <linux-edac@vger.kernel.org>, <mchehab+huawei@kernel.org>
Cc: <linuxarm@openeuler.org>, <tanxiaofei@huawei.com>,
	<jonathan.cameron@huawei.com>
Subject: [PATCH v2 2/8] rasdaemon: ras-mc-ctl: Modify ARM processor error summary log
Date: Mon, 25 Jan 2021 17:14:49 +0000	[thread overview]
Message-ID: <20210125171455.1886-3-shiju.jose@huawei.com> (raw)
In-Reply-To: <20210125171455.1886-1-shiju.jose@huawei.com>

Add CPU's mpidr information to the ARM processor error
summary log.

Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
---
 util/ras-mc-ctl.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/util/ras-mc-ctl.in b/util/ras-mc-ctl.in
index dd7d56f..d8abdbd 100755
--- a/util/ras-mc-ctl.in
+++ b/util/ras-mc-ctl.in
@@ -1123,7 +1123,7 @@ sub summary
     my ($err_type, $label, $mc, $top, $mid, $low, $count, $msg);
     my ($etype, $severity, $etype_string, $severity_string);
     my ($dev_name, $dev);
-    my ($affinity, $mpidr);
+    my ($mpidr);
 
     my $dbh = DBI->connect("dbi:SQLite:dbname=$dbname", "", "", {});
 
@@ -1160,13 +1160,13 @@ sub summary
     $query_handle->finish;
 
     # ARM processor arm_event errors
-    $query = "select affinity, mpidr, count(*) from arm_event group by affinity, mpidr";
+    $query = "select mpidr, count(*) from arm_event group by mpidr";
     $query_handle = $dbh->prepare($query);
     $query_handle->execute();
-    $query_handle->bind_columns(\($affinity, $mpidr, $count));
+    $query_handle->bind_columns(\($mpidr, $count));
     $out = "";
     while($query_handle->fetch()) {
-        $out .= "\t$count errors\n";
+        $out .= sprintf "\tCPU(mpidr=0x%x) has %d errors\n", $mpidr, $count;
     }
     if ($out ne "") {
         print "ARM processor events summary:\n$out\n";
-- 
2.17.1


  parent reply	other threads:[~2021-01-25 17:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 17:14 [PATCH v2 0/8] rasdaemon: add support for memory_failure events, Shiju Jose
2021-01-25 17:14 ` [PATCH v2 1/8] rasdaemon: add support for memory_failure events Shiju Jose
2021-01-25 17:14 ` Shiju Jose [this message]
2021-01-25 17:14 ` [PATCH v2 3/8] rasdaemon: ras-mc-ctl: Add memory failure events Shiju Jose
2021-01-25 17:14 ` [PATCH v2 4/8] rasdaemon: ras-mc-ctl: Fix for exception when an event is not enabled Shiju Jose
2021-01-25 17:14 ` [PATCH v2 5/8] rasdaemon: ras-mc-ctl: Add support for the vendor-specific errors Shiju Jose
2021-01-25 17:14 ` [PATCH v2 6/8] rasdaemon: ras-mc-ctl: Add support for HiSilicon Kunpeng920 errors Shiju Jose
2021-01-25 17:14 ` [PATCH v2 7/8] rasdaemon: ras-mc-ctl: Add support for HiSilicon Kunpeng9xx common errors Shiju Jose
2021-01-25 17:14 ` [PATCH v2 8/8] rasdaemon: Modify confiure.ac for Hisilicon Kunpeng errors Shiju Jose

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=20210125171455.1886-3-shiju.jose@huawei.com \
    --to=shiju.jose@huawei.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linuxarm@openeuler.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=tanxiaofei@huawei.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).