From: <shiju.jose@huawei.com>
To: <linux-edac@vger.kernel.org>, <linux-pci@vger.kernel.org>,
<linux-cxl@vger.kernel.org>, <mchehab@kernel.org>
Cc: <qingshun.wang@linux.intel.com>, <jonathan.cameron@huawei.com>,
<tanxiaofei@huawei.com>, <prime.zeng@hisilicon.com>,
<linuxarm@huawei.com>, <shiju.jose@huawei.com>
Subject: [RFC PATCH 2/2] rasdaemon: ras-mc-ctl: Add support for new fields in aer_event for advisory non-fatal and other errors
Date: Thu, 15 Feb 2024 19:46:59 +0800 [thread overview]
Message-ID: <20240215114659.1513-3-shiju.jose@huawei.com> (raw)
In-Reply-To: <20240215114659.1513-1-shiju.jose@huawei.com>
From: Shiju Jose <shiju.jose@huawei.com>
Add support for following new fields added in trace aer_event
for advisory non-fatal and other errors.
- cor_status (Correctable Error Status)
- cor_mask (Correctable Error Mask)
- uncor_status (Uncorrectable Error Status)
- uncor_severity (Uncorrectable Error Severity)
- uncor_mask (Uncorrectable Error Mask)
- aer_cap_ctrl (AER Capabilities and Control)
- link_status (Link Status)
- device_status (Device Status)
- device_control_2 (Device Control 2)
https://lore.kernel.org/lkml/20240125062802.50819-5-qingshun.wang@linux.intel.com/
Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
---
util/ras-mc-ctl.in | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/util/ras-mc-ctl.in b/util/ras-mc-ctl.in
index a7ece13..e5ee040 100755
--- a/util/ras-mc-ctl.in
+++ b/util/ras-mc-ctl.in
@@ -1750,12 +1750,13 @@ sub errors
my ($dev, $sector, $nr_sector, $error, $rwbs, $cmd);
my ($error_count, $affinity, $mpidr, $r_state, $psci_state);
my ($pfn, $page_type, $action_result);
+ my ($cor_status, $cor_mask, $uncor_status, $uncor_mask, $uncor_severity, $cap_control, $first_err_pointer, $link_status, $device_status, $device_control_2);
my ($memdev, $host, $serial, $error_status, $first_error, $header_log);
my ($log_type, $first_ts, $last_ts);
my ($trace_type, $region, $region_uuid, $hpa, $dpa, $dpa_length, $source, $flags, $overflow_ts);
my ($hdr_uuid, $hdr_flags, $hdr_handle, $hdr_related_handle, $hdr_ts, $hdr_length, $hdr_maint_op_class, $data);
my ($dpa_flags, $descriptor, $mem_event_type, $transaction_type, $channel, $rank, $device, $comp_id);
- my ($nibble_mask, $bank_group, $row, $column, $cor_mask);
+ my ($nibble_mask, $bank_group, $row, $column);
my ($event_type, $health_status, $media_status, $life_used, $dirty_shutdown_cnt, $cor_vol_err_cnt, $cor_per_err_cnt, $device_temp, $add_status);
my $dbh = DBI->connect("dbi:SQLite:dbname=$dbname", "", "", {});
@@ -1782,13 +1783,23 @@ sub errors
# PCIe AER aer_event errors
if ($has_aer == 1) {
- $query = "select id, timestamp, dev_name, err_type, err_msg from aer_event$conf{opt}{since} order by id";
+ $query = "select id, timestamp, dev_name, err_type, err_msg, cor_status, cor_mask, uncor_status, uncor_mask, uncor_severity, cap_control, first_err_pointer, link_status, device_status, device_control_2 from aer_event$conf{opt}{since} order by id";
$query_handle = $dbh->prepare($query);
$query_handle->execute();
- $query_handle->bind_columns(\($id, $time, $devname, $type, $msg));
+ $query_handle->bind_columns(\($id, $time, $devname, $type, $msg, $cor_status, $cor_mask, $uncor_status, $uncor_mask, $uncor_severity, $cap_control, $first_err_pointer, $link_status, $device_status, $device_control_2));
$out = "";
while($query_handle->fetch()) {
- $out .= "$id $time $devname $type error: $msg\n";
+ $out .= "$id $time $devname $type error: $msg ";
+ $out .= sprintf "cor_status=0x%08x ", $cor_status if (defined $cor_status && length $cor_status);
+ $out .= sprintf "cor_mask=0x%08x ", $cor_mask if (defined $cor_mask && length $cor_mask);
+ $out .= sprintf "uncor_status=0x%08x ", $uncor_status if (defined $uncor_status && length $uncor_status);
+ $out .= sprintf "uncor_mask=0x%08x ", $uncor_mask if (defined $uncor_mask && length $uncor_mask);
+ $out .= sprintf "uncor_severity=0x%08x ", $uncor_severity if (defined $uncor_severity && length $uncor_severity);
+ $out .= sprintf "cap_control=0x%08x ", $cap_control if (defined $cap_control && length $cap_control);
+ $out .= sprintf "first_error_pointer=0x%x ", $first_err_pointer if (defined $first_err_pointer && length $first_err_pointer);
+ $out .= sprintf "link_status=0x%04x ", $link_status if (defined $link_status && length $link_status);
+ $out .= sprintf "device_status=0x%04x ", $device_status if (defined $device_status && length $device_status);
+ $out .= sprintf "device_control_2=0x%04x", $device_control_2 if (defined $device_control_2 && length $device_control_2);
}
if ($out ne "") {
print "PCIe AER events:\n$out\n";
--
2.34.1
prev parent reply other threads:[~2024-02-15 11:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 11:46 [RFC PATCH 0/2] rasdaemon: Add handling of new fields in aer_event for advisory non-fatal and other errors shiju.jose
2024-02-15 11:46 ` [RFC PATCH 1/2] " shiju.jose
2024-02-15 11:46 ` shiju.jose [this message]
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=20240215114659.1513-3-shiju.jose@huawei.com \
--to=shiju.jose@huawei.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mchehab@kernel.org \
--cc=prime.zeng@hisilicon.com \
--cc=qingshun.wang@linux.intel.com \
--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 read-only IMAP folder(s) and NNTP newsgroup(s).