rasdaemon/0003-rasdaemon-ras-mc-ctl-Reformat-error-info-of-the-HiSi.patch
Shiju Jose d12d3023a9 rasdaemon: Modify the format of the Hisilicon Kunpeng9xx common error records and improvements in the ras-mc-ctl for the Hisilicon Kunpeng9xx errors
1. Modify the recording format of the Hisilicon Kunpeng9xx common errors in the rasdaemon.
2. In the ras-mc-ctl,
2.1. Modify the error statistics for the HiSilicon Kunpeng9xx common errors to display
     the statistics and error info based on the module and the error severity..
2.2. Add support to display the vendor-errors for a specified module.
2.3. Add printing usage if the necessary parameters are not passed for the
     vendor-errors options.
2.4. Reformat error info of the HiSilicon Kunpeng920.
2.5. Relocate reading and display Kunpeng920 errors to under Kunpeng9xx.

Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
(cherry picked from commit ca01a3db7b2b002855070d02a095296680325354)
2022-03-28 16:09:21 +08:00

57 lines
2.5 KiB
Diff

From eb93d77b417b58cba27799ae85747b8a193cf063 Mon Sep 17 00:00:00 2001
From: Shiju Jose <shiju.jose@huawei.com>
Date: Sat, 5 Mar 2022 16:18:55 +0000
Subject: [PATCH 3/6] rasdaemon: ras-mc-ctl: Reformat error info of the
HiSilicon Kunpeng920
Reformat the code to display the error info of HiSilicon Kunpeng920.
Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
---
util/ras-mc-ctl.in | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/util/ras-mc-ctl.in b/util/ras-mc-ctl.in
index 22ba1fd..eeaf885 100755
--- a/util/ras-mc-ctl.in
+++ b/util/ras-mc-ctl.in
@@ -1669,8 +1669,9 @@ sub vendor_errors
$out .= "nimbus_id=$nimbus_id, " if ($nimbus_id);
$out .= "module_id=$module_id, " if ($module_id);
$out .= "sub_module_id=$sub_module_id, " if ($sub_module_id);
- $out .= "err_severity=$err_severity, \n" if ($err_severity);
- $out .= "Error Registers: $regs\n\n" if ($regs);
+ $out .= "err_severity=$err_severity, " if ($err_severity);
+ $out .= "Error Registers: $regs " if ($regs);
+ $out .= "\n\n";
}
if ($out ne "") {
print "HiSilicon Kunpeng920 OEM type1 error events:\n$out\n";
@@ -1692,8 +1693,9 @@ sub vendor_errors
$out .= "nimbus_id=$nimbus_id, " if ($nimbus_id);
$out .= "module_id=$module_id, " if ($module_id);
$out .= "sub_module_id=$sub_module_id, " if ($sub_module_id);
- $out .= "err_severity=$err_severity, \n" if ($err_severity);
- $out .= "Error Registers: $regs\n\n" if ($regs);
+ $out .= "err_severity=$err_severity, " if ($err_severity);
+ $out .= "Error Registers: $regs " if ($regs);
+ $out .= "\n\n";
}
if ($out ne "") {
print "HiSilicon Kunpeng920 OEM type2 error events:\n$out\n";
@@ -1717,8 +1719,9 @@ sub vendor_errors
$out .= "core_id=$core_id, " if ($core_id);
$out .= "port_id=$port_id, " if ($port_id);
$out .= "err_severity=$err_severity, " if ($err_severity);
- $out .= "err_type=$err_type, \n" if ($err_type);
- $out .= "Error Registers: $regs\n\n" if ($regs);
+ $out .= "err_type=$err_type, " if ($err_type);
+ $out .= "Error Registers: $regs " if ($regs);
+ $out .= "\n\n";
}
if ($out ne "") {
print "HiSilicon Kunpeng920 PCIe controller error events:\n$out\n";
--
2.25.1