linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] rasdaemon: ras-mc-ctl: Add ARM processor error information
@ 2020-08-11 12:31 Shiju Jose
  2020-09-01  6:34 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 2+ messages in thread
From: Shiju Jose @ 2020-08-11 12:31 UTC (permalink / raw)
  To: mchehab+huawei, linux-edac; +Cc: linuxarm, tanxiaofei, jonathan.cameron

Add supporting ARM processor error in the ras-mc-ctl tool.

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

diff --git a/util/ras-mc-ctl.in b/util/ras-mc-ctl.in
index ff38143..dd7d56f 100755
--- a/util/ras-mc-ctl.in
+++ b/util/ras-mc-ctl.in
@@ -1123,6 +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 $dbh = DBI->connect("dbi:SQLite:dbname=$dbname", "", "", {});
 
@@ -1158,6 +1159,22 @@ sub summary
     }
     $query_handle->finish;
 
+    # ARM processor arm_event errors
+    $query = "select affinity, mpidr, count(*) from arm_event group by affinity, mpidr";
+    $query_handle = $dbh->prepare($query);
+    $query_handle->execute();
+    $query_handle->bind_columns(\($affinity, $mpidr, $count));
+    $out = "";
+    while($query_handle->fetch()) {
+        $out .= "\t$count errors\n";
+    }
+    if ($out ne "") {
+        print "ARM processor events summary:\n$out\n";
+    } else {
+        print "No ARM processor errors.\n\n";
+    }
+    $query_handle->finish;
+
     # extlog errors
     $query = "select etype, severity, count(*) from extlog_event group by etype, severity";
     $query_handle = $dbh->prepare($query);
@@ -1235,6 +1252,7 @@ sub errors
     my ($timestamp, $etype, $severity, $etype_string, $severity_string, $fru_id, $fru_text, $cper_data);
     my ($bus_name, $dev_name, $driver_name, $reporter_name);
     my ($dev, $sector, $nr_sector, $error, $rwbs, $cmd);
+    my ($error_count, $affinity, $mpidr, $r_state, $psci_state);
 
     my $dbh = DBI->connect("dbi:SQLite:dbname=$dbname", "", "", {});
 
@@ -1274,6 +1292,28 @@ sub errors
     }
     $query_handle->finish;
 
+    # ARM processor arm_event errors
+    $query = "select id, timestamp, error_count, affinity, mpidr, running_state, psci_state from arm_event order by id";
+    $query_handle = $dbh->prepare($query);
+    $query_handle->execute();
+    $query_handle->bind_columns(\($id, $timestamp, $error_count, $affinity, $mpidr, $r_state, $psci_state));
+    $out = "";
+    while($query_handle->fetch()) {
+        $out .= "$id $timestamp error: ";
+        $out .= "error_count=$error_count, " if ($error_count);
+        $out .= "affinity_level=$affinity, ";
+        $out .= sprintf "mpidr=0x%x, ", $mpidr;
+        $out .= sprintf "running_state=0x%x, ", $r_state;
+        $out .= sprintf "psci_state=0x%x", $psci_state;
+        $out .= "\n";
+    }
+    if ($out ne "") {
+        print "ARM processor events:\n$out\n";
+    } else {
+        print "No ARM processor errors.\n\n";
+    }
+    $query_handle->finish;
+
     # Extlog errors
     $query = "select id, timestamp, etype, severity, address, fru_id, fru_text, cper_data from extlog_event order by id";
     $query_handle = $dbh->prepare($query);
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] rasdaemon: ras-mc-ctl: Add ARM processor error information
  2020-08-11 12:31 [PATCH 1/1] rasdaemon: ras-mc-ctl: Add ARM processor error information Shiju Jose
@ 2020-09-01  6:34 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2020-09-01  6:34 UTC (permalink / raw)
  To: Shiju Jose; +Cc: linux-edac, linuxarm, tanxiaofei, jonathan.cameron

Em Tue, 11 Aug 2020 13:31:46 +0100
Shiju Jose <shiju.jose@huawei.com> escreveu:

> Add supporting ARM processor error in the ras-mc-ctl tool.
> 
> Signed-off-by: Shiju Jose <shiju.jose@huawei.com>

Patch merged, thanks!

Thanks,
Mauro

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-01  6:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11 12:31 [PATCH 1/1] rasdaemon: ras-mc-ctl: Add ARM processor error information Shiju Jose
2020-09-01  6:34 ` Mauro Carvalho Chehab

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).