Resolves: RHEL-20350, getting larger Negative value while running rtas_dbg -l

Resolves: RHEL-19076, installation fails if nsid of nvme device is greater than 10
Resolves: RHEL-11456, add new /etc/drmgr.d/pmig hierarchy
This commit is contained in:
Than Ngo 2024-01-10 09:51:10 +01:00
parent 5aa234473f
commit 3df7023995
3 changed files with 130 additions and 14 deletions

View File

@ -0,0 +1,33 @@
commit 8a7aa61c5f520df03e53e6f7e1d63b7d5c432376
Author: Wen Xiong <wenxiong@linux.ibm.com>
Date: Wed Nov 15 14:37:43 2023 -0600
powerpc-utils/scripts/ofpathname: handle nsid of nvme device as hex number
Installation fails if nsid of nvme device is greater than 10.
The patch fixes the issue and handle nsid of nvme ad a hex number.
Signed-off-by: Wen Xiong <wenxiong@linux.ibm.com>
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
diff --git a/scripts/ofpathname b/scripts/ofpathname
index 3abe4d1..833d03f 100755
--- a/scripts/ofpathname
+++ b/scripts/ofpathname
@@ -722,6 +722,7 @@ l2of_nvme()
err $ERR_NO_OFPATH
fi
+ devnsid=$(printf "%x" $devnsid)
OF_PATH="$OF_PATH/$devtype@$devnsid"
# No partition (pZ) specified.
@@ -1798,6 +1799,7 @@ of2l_nvme()
cd $dir
local devnsid=`$CAT ./nsid 2>/dev/null`
+ devnsid=$(printf "%x" $devnsid)
if [[ $devnsid = $nsid ]]; then
LOGICAL_DEVNAME="${dir##*/}"
break

View File

@ -0,0 +1,70 @@
commit 9caa77e4477a73064a6deea253fd3faea32648fb
Author: Likhitha Korrapati <likhitha@linux.ibm.com>
Date: Fri Nov 17 01:42:29 2023 -0500
rtas_dbg: Fix the large negative values in rtas_dbg
without the patch:
[root@xxx powerpc-utils]# rtas_dbg -l ibm,rks-hcalls
Could not get rtas token for ibm,indicator-0002
Could not get rtas token for ibm,integrated-stop-self
Could not get rtas token for ibm,indicator-9005
Could not get rtas token for ibm,extended-os-term
Could not get rtas token for ibm,indicator-0001
Could not get rtas token for ibm,sensor-0009
Could not get rtas token for ibm,recoverable-epow3
Could not get rtas token for ibm,sensor-9005
Could not get rtas token for ibm,change-msix-capable
Could not get rtas token for ibm,sensor-0005
Could not get rtas token for ibm,sensor-0001
ibm,rks-hcalls -536870912
The large negatives values are due to incompatible format(%d).
The data type of the token variable is uint32_t.This patch
modifies the format(%u) to align with its data type(uint32_t).
with the patch:
[root@xxx powerpc-utils]# ./src/rtas_dbg -l ibm,rks-hcalls
Could not get rtas token for ibm,indicator-0002
Could not get rtas token for ibm,integrated-stop-self
Could not get rtas token for ibm,indicator-9005
Could not get rtas token for ibm,extended-os-term
Could not get rtas token for ibm,indicator-0001
Could not get rtas token for ibm,sensor-0009
Could not get rtas token for ibm,recoverable-epow3
Could not get rtas token for ibm,sensor-9005
Could not get rtas token for ibm,change-msix-capable
Could not get rtas token for ibm,sensor-0005
Could not get rtas token for ibm,sensor-0001
ibm,rks-hcalls 3758096384
Reported-by: Shirisha Ganta <shirisha@linux.ibm.com>
Signed-off-by: Likhitha Korrapati <likhitha@linux.ibm.com>
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
diff --git a/src/rtas_dbg.c b/src/rtas_dbg.c
index ebc7474..6c7854a 100644
--- a/src/rtas_dbg.c
+++ b/src/rtas_dbg.c
@@ -200,10 +200,10 @@ void print_rtas_tokens(struct rtas_token *tok, struct rtas_token *tok_list)
struct rtas_token *t;
if (tok)
- printf("%-40s%d\n", tok->name, tok->token);
+ printf("%-40s%u\n", tok->name, tok->token);
else {
for (t = tok_list; t; t = t->next)
- printf("%-40s%d\n", t->name, t->token);
+ printf("%-40s%u\n", t->name, t->token);
}
}
@@ -217,7 +217,7 @@ int set_rtas_dbg(struct rtas_token *tok)
args.nret = htobe32(1);
args.args[0] = htobe32(tok->token);
- printf("Enabling rtas debug for %s (%d)\n", tok->name, tok->token);
+ printf("Enabling rtas debug for %s (%u)\n", tok->name, tok->token);
rc = rtas(&args);

View File

@ -1,6 +1,6 @@
Name: powerpc-utils
Version: 1.3.10
Release: 8%{?dist}
Release: 9%{?dist}
Summary: PERL-based scripts for maintaining and servicing PowerPC systems
License: GPLv2
@ -45,23 +45,27 @@ Patch18: powerpc-utils-372599ed28d65a79d4c3b3405a8e04034eb58e09.patch
Patch19: powerpc-utils-e0928dc5e5375591a4cff6ffabc6063771288f59.patch
Patch20: powerpc-utils-d0bc79aedaf76eff09a5d1f399da09561a4d4d7d.patch
Patch21: powerpc-utils-7698adc945372e901c2bc3f7066a5a1c219bf1d8.patch
# lpar can't boot up after installation if nsid of nvme device is greater than 10.
Patch22: powerpc-utils-8a7aa61c5f520df03e53e6f7e1d63b7d5c432376.patch
# rtas_dbg -l returns large negativ value
Patch23: powerpc-utils-rtas_dbg_return_negativ_value.patch
ExclusiveArch: ppc %{power64}
ExclusiveArch: ppc %{power64}
BuildRequires: gcc
BuildRequires: make
BuildRequires: automake
BuildRequires: doxygen
BuildRequires: zlib-devel
BuildRequires: librtas-devel >= 1.4.0
BuildRequires: libservicelog-devel >= 1.0.1-2
BuildRequires: perl-generators
BuildRequires: systemd
BuildRequires: numactl-devel
BuildRequires: gcc
BuildRequires: make
BuildRequires: automake
BuildRequires: doxygen
BuildRequires: zlib-devel
BuildRequires: librtas-devel >= 1.4.0
BuildRequires: libservicelog-devel >= 1.0.1-2
BuildRequires: perl-generators
BuildRequires: systemd
BuildRequires: numactl-devel
# rtas_dump explicit dependency
Requires: perl(Data::Dumper)
Requires: %{name}-core = %{version}-%{release}
Requires: perl(Data::Dumper)
Requires: %{name}-core = %{version}-%{release}
%description
PERL-based scripts for maintaining and servicing PowerPC systems.
@ -131,6 +135,9 @@ ln -s serv_config.8 %{buildroot}%{_mandir}/man8/uspchrp.8
# deprecated, use sosreport instead
rm -f $RPM_BUILD_ROOT%{_sbindir}/snap $RPM_BUILD_ROOT%{_mandir}/man8/snap.8*
# add hierachy /etc/drmgr.d/pmig
mkdir -p $RPM_BUILD_ROOT/etc/drmgr.d/pmig
%post core
%systemd_post hcn-init.service
# update the smt.state file with current SMT
@ -158,6 +165,7 @@ systemctl enable hcn-init.service >/dev/null 2>&1 || :
%files core
%license COPYING
%dir %{_localstatedir}/lib/powerpc-utils
%dir /etc/drmgr.d/pmig
%config(noreplace) %{_localstatedir}/lib/powerpc-utils/smt.state
%{_unitdir}/smtstate.service
%{_unitdir}/smt_off.service
@ -235,6 +243,11 @@ systemctl enable hcn-init.service >/dev/null 2>&1 || :
%changelog
* Wed Jan 10 2024 Than Ngo <than@redhat.com> - 1.3.10-9
- Resolves: RHEL-20350, getting larger Negative value while running rtas_dbg -l
- Resolves: RHEL-19076, installation fails if nsid of nvme device is greater than 10
- Resolves: RHEL-11456, add new /etc/drmgr.d/pmig hierarchy
* Mon Nov 27 2023 Than Ngo <than@redhat.com> - 1.3.10-8
- Resolves: RHEL-16045, Support partial SMT level through SYS FS smt/control files
- Resolves: RHEL-11456, LPM hooks