From dc426d5fbc901059fa680ef923e18dce0a1db453 Mon Sep 17 00:00:00 2001 From: Bing Xia Date: Mon, 22 Apr 2024 20:30:13 +0800 Subject: [PATCH] rasdaemon: ras-mc-ctl: Modify check for HiSilicon KunPeng9xx error fields Modify check for valid HiSilicon KunPeng9xx error fields. Fixes an error data is not printed when it's value is 0. --- ...-ctl-Modify-check-for-HiSilicon-KunP.patch | 122 ++++++++++++++++++ rasdaemon.spec | 9 +- 2 files changed, 130 insertions(+), 1 deletion(-) create mode 100644 rasdaemon-ras-mc-ctl-Modify-check-for-HiSilicon-KunP.patch diff --git a/rasdaemon-ras-mc-ctl-Modify-check-for-HiSilicon-KunP.patch b/rasdaemon-ras-mc-ctl-Modify-check-for-HiSilicon-KunP.patch new file mode 100644 index 0000000..a72f125 --- /dev/null +++ b/rasdaemon-ras-mc-ctl-Modify-check-for-HiSilicon-KunP.patch @@ -0,0 +1,122 @@ +From bcc5779d52269b5a0b7bae42aaf2a3e650587bdb Mon Sep 17 00:00:00 2001 +From: Shiju Jose +Date: Thu, 24 Aug 2023 13:07:17 +0100 +Subject: [PATCH 12/12] rasdaemon: ras-mc-ctl: Modify check for HiSilicon + KunPeng9xx error fields + +Modify check for valid HiSilicon KunPeng9xx error fields. +Fixes an error data is not printed when it's value is 0. + +Signed-off-by: Shiju Jose +Signed-off-by: Mauro Carvalho Chehab +--- + util/ras-mc-ctl.in | 72 +++++++++++++++++++++++----------------------- + 1 file changed, 36 insertions(+), 36 deletions(-) + +diff --git a/util/ras-mc-ctl.in b/util/ras-mc-ctl.in +index 4178dcf..07e6fca 100755 +--- a/util/ras-mc-ctl.in ++++ b/util/ras-mc-ctl.in +@@ -1672,13 +1672,13 @@ sub vendor_errors + if ($module eq 0 || ($module_id && uc($module) eq uc($module_id))) { + $out .= "$id. $timestamp Error Info: "; + $out .= "version=$version, "; +- $out .= "soc_id=$soc_id, " if ($soc_id); +- $out .= "socket_id=$socket_id, " if ($socket_id); +- $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, " if ($err_severity); +- $out .= "Error Registers: $regs " if ($regs); ++ $out .= "soc_id=$soc_id, " if (defined $soc_id && length $soc_id); ++ $out .= "socket_id=$socket_id, " if (defined $socket_id && length $socket_id); ++ $out .= "nimbus_id=$nimbus_id, " if (defined $nimbus_id && length $nimbus_id); ++ $out .= "module_id=$module_id, " if (defined $module_id && length $module_id); ++ $out .= "sub_module_id=$sub_module_id, " if (defined $sub_module_id && length $sub_module_id); ++ $out .= "err_severity=$err_severity, " if (defined $err_severity && length $err_severity); ++ $out .= "Error Registers: $regs " if (defined $regs && length $regs); + $out .= "\n\n"; + $found_module = 1; + } +@@ -1697,13 +1697,13 @@ sub vendor_errors + if ($module eq 0 || ($module_id && uc($module) eq uc($module_id))) { + $out .= "$id. $timestamp Error Info: "; + $out .= "version=$version, "; +- $out .= "soc_id=$soc_id, " if ($soc_id); +- $out .= "socket_id=$socket_id, " if ($socket_id); +- $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, " if ($err_severity); +- $out .= "Error Registers: $regs " if ($regs); ++ $out .= "soc_id=$soc_id, " if (defined $soc_id && length $soc_id); ++ $out .= "socket_id=$socket_id, " if (defined $socket_id && length $socket_id); ++ $out .= "nimbus_id=$nimbus_id, " if (defined $nimbus_id && length $nimbus_id); ++ $out .= "module_id=$module_id, " if (defined $module_id && length $module_id); ++ $out .= "sub_module_id=$sub_module_id, " if (defined $sub_module_id && length $sub_module_id); ++ $out .= "err_severity=$err_severity, " if (defined $err_severity && length $err_severity); ++ $out .= "Error Registers: $regs " if (defined $regs && length $regs); + $out .= "\n\n"; + $found_module = 1; + } +@@ -1722,15 +1722,15 @@ sub vendor_errors + if ($module eq 0 || ($sub_module_id && uc($module) eq uc($sub_module_id))) { + $out .= "$id. $timestamp Error Info: "; + $out .= "version=$version, "; +- $out .= "soc_id=$soc_id, " if ($soc_id); +- $out .= "socket_id=$socket_id, " if ($socket_id); +- $out .= "nimbus_id=$nimbus_id, " if ($nimbus_id); +- $out .= "sub_module_id=$sub_module_id, " if ($sub_module_id); +- $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, " if ($err_type); +- $out .= "Error Registers: $regs " if ($regs); ++ $out .= "soc_id=$soc_id, " if (defined $soc_id && length $soc_id); ++ $out .= "socket_id=$socket_id, " if (defined $socket_id && length $socket_id); ++ $out .= "nimbus_id=$nimbus_id, " if (defined $nimbus_id && length $nimbus_id); ++ $out .= "sub_module_id=$sub_module_id, " if (defined $sub_module_id && length $sub_module_id); ++ $out .= "core_id=$core_id, " if (defined $core_id && length $core_id); ++ $out .= "port_id=$port_id, " if (defined $port_id && length $port_id); ++ $out .= "err_severity=$err_severity, " if (defined $err_severity && length $err_severity); ++ $out .= "err_type=$err_type, " if (defined $err_type && length $err_type); ++ $out .= "Error Registers: $regs " if (defined $regs && length $regs); + $out .= "\n\n"; + $found_module = 1; + } +@@ -1749,19 +1749,19 @@ sub vendor_errors + if ($module eq 0 || ($module_id && uc($module) eq uc($module_id))) { + $out .= "$id. $timestamp Error Info: "; + $out .= "version=$version, "; +- $out .= "soc_id=$soc_id, " if ($soc_id); +- $out .= "socket_id=$socket_id, " if ($socket_id); +- $out .= "totem_id=$totem_id, " if ($totem_id); +- $out .= "nimbus_id=$nimbus_id, " if ($nimbus_id); +- $out .= "sub_system_id=$sub_system_id, " if ($sub_system_id); +- $out .= "module_id=$module_id, " if ($module_id); +- $out .= "sub_module_id=$sub_module_id, " if ($sub_module_id); +- $out .= "core_id=$core_id, " if ($core_id); +- $out .= "port_id=$port_id, " if ($port_id); +- $out .= "err_type=$err_type, " if ($err_type); +- $out .= "pcie_info=$pcie_info, " if ($pcie_info); +- $out .= "err_severity=$err_severity, " if ($err_severity); +- $out .= "Error Registers: $regs" if ($regs); ++ $out .= "soc_id=$soc_id, " if (defined $soc_id && length $soc_id); ++ $out .= "socket_id=$socket_id, " if (defined $socket_id && length $socket_id); ++ $out .= "totem_id=$totem_id, " if (defined $totem_id && length $totem_id); ++ $out .= "nimbus_id=$nimbus_id, " if (defined $nimbus_id && length $nimbus_id); ++ $out .= "sub_system_id=$sub_system_id, " if (defined $sub_system_id && length $sub_system_id); ++ $out .= "module_id=$module_id, " if (defined $module_id && length $module_id); ++ $out .= "sub_module_id=$sub_module_id, " if (defined $sub_module_id && length $sub_module_id); ++ $out .= "core_id=$core_id, " if (defined $core_id && length $core_id ); ++ $out .= "port_id=$port_id, " if (defined $port_id && length $port_id); ++ $out .= "err_type=$err_type, " if (defined $err_type && length $err_type); ++ $out .= "pcie_info=$pcie_info, " if (defined $pcie_info && length $pcie_info); ++ $out .= "err_severity=$err_severity, " if (defined $err_severity && length $err_severity); ++ $out .= "Error Registers: $regs" if (defined $regs && length $regs); + $out .= "\n\n"; + $found_module = 1; + } +-- +2.25.1 + diff --git a/rasdaemon.spec b/rasdaemon.spec index 87459a7..beb3224 100644 --- a/rasdaemon.spec +++ b/rasdaemon.spec @@ -1,6 +1,6 @@ Name: rasdaemon Version: 0.8.0 -Release: 4 +Release: 5 License: GPLv2 Summary: Utility to get Platform Reliability, Availability and Serviceability (RAS) reports via the Kernel tracing events URL: https://github.com/mchehab/rasdaemon.git @@ -33,6 +33,7 @@ Patch9006: 0003-rasdaemon-Add-support-for-creating-the-vendor-error-.patch Patch9007: backport-Check-CPUs-online-not-configured.patch Patch9008: backport-rasdaemon-diskerror-fix-incomplete-diskerror-log.patch Patch9009: bugfix-fix-cpu-isolate-errors-when-some-cpus-are-.patch +Patch9010: rasdaemon-ras-mc-ctl-Modify-check-for-HiSilicon-KunP.patch %description The rasdaemon program is a daemon which monitors the platform @@ -84,6 +85,12 @@ fi /usr/bin/systemctl disable rasdaemon.service >/dev/null 2>&1 || : %changelog +* Thu Apr 25 2024 Bing Xia - 0.8.0-5 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Modify check for HiSilicon KunPeng9xx error fields. + * Tue Apr 23 2024 luoshengwei - 0.8.0-4 - Type:bugfix - ID:NA -- Gitee