diff mbox series

[v3,2/7] rasdaemon: ras-mc-ctl: Modify ARM processor error summary log

Message ID 20210308165732.273-3-shiju.jose@huawei.com (mailing list archive)
State New, archived
Headers show
Series rasdaemon: Add support for memory_failure events and vendor errors | expand

Commit Message

Shiju Jose March 8, 2021, 4:57 p.m. UTC
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 mbox series

Patch

diff --git a/util/ras-mc-ctl.in b/util/ras-mc-ctl.in
index 1fbeb63..21e9d29 100755
--- a/util/ras-mc-ctl.in
+++ b/util/ras-mc-ctl.in
@@ -1137,7 +1137,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", "", "", {});
 
@@ -1177,13 +1177,13 @@  sub summary
 
     # ARM processor arm_event errors
     if ($has_arm == 1) {
-        $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";