Compare commits
2 Commits
e84e59c355
...
406c7c01bd
Author | SHA1 | Date |
---|---|---|
Than Ngo | 406c7c01bd | |
Than Ngo | 3df7023995 |
|
@ -0,0 +1 @@
|
||||||
|
4596fced545f3c751ff2665663baaed0db7ab7ce powerpc-utils-1.3.10.tar.gz
|
|
@ -0,0 +1,171 @@
|
||||||
|
From edf7ee0e03e60140bcbe34ec458e1361678a5dd2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Wen Xiong <wenxiong@linux.ibm.com>
|
||||||
|
Date: Thu, 25 Jan 2024 23:49:21 -0500
|
||||||
|
Subject: [PATCH] scripts/bootlist: Support multiple dev paths for a nvme boot
|
||||||
|
device
|
||||||
|
|
||||||
|
Multipath splitter drawer is going to support two physical paths for
|
||||||
|
each nvme device.
|
||||||
|
This patch adds the support for multiple device/of paths for a nvme boot
|
||||||
|
device.
|
||||||
|
|
||||||
|
For example,
|
||||||
|
|
||||||
|
U50EE.001.WZS000E-P3-C1-R1 U.2 PCI-E capable, Rev 4, 4x lanes with 2x
|
||||||
|
lanes connected 0581:10:00.0
|
||||||
|
U50EE.001.WZS000E-P3-C1-R2 U.2 PCI-E capable, Rev 4, 4x lanes with 2x
|
||||||
|
lanes connected 0521:10:00.0
|
||||||
|
|
||||||
|
nvme-subsys1 -
|
||||||
|
NQN=nqn.1994-11.com.samsung:nvme:PM1735a:2.5-inch:S6RUNE0R900042
|
||||||
|
hostnqn=nqn.2014-08.org.nvmexpress:uuid:3c6c1ace-e9b1-4a17-8ff0-6a84d3dd15f4
|
||||||
|
iopolicy=numa
|
||||||
|
\
|
||||||
|
+- nvme1 pcie 0523:20:00.0 live
|
||||||
|
+- nvme0 pcie 0583:20:00.0 live
|
||||||
|
|
||||||
|
Node Generic SN Model
|
||||||
|
Namespace Usage Format FW Rev
|
||||||
|
--------------------- --------------------- --------------------
|
||||||
|
---------------------------------------- ----------
|
||||||
|
-------------------------- ---------------- --------
|
||||||
|
/dev/nvme1n1 /dev/ng1n1 S6RUNE0R900042 1.6TB
|
||||||
|
NVMe Gen4 U.2 SSD III 0x1 1.60 TB / 1.60 TB
|
||||||
|
4 KiB + 0 B REV.SN66
|
||||||
|
nvme0
|
||||||
|
nvme1n1
|
||||||
|
/pci@800000020000583/pci1014,6bc@0/namespace@1
|
||||||
|
/pci@800000020000523/pci1014,6bc@0/namespace@1
|
||||||
|
|
||||||
|
Signed-off-by: Wen Xiong <wenxiong@linux.ibm.com>
|
||||||
|
---
|
||||||
|
scripts/bootlist | 80 +++++++++++++++++++++++++++++++++++++++---------
|
||||||
|
1 file changed, 66 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/scripts/bootlist b/scripts/bootlist
|
||||||
|
index cc8718e..dcb5c00 100755
|
||||||
|
--- a/scripts/bootlist
|
||||||
|
+++ b/scripts/bootlist
|
||||||
|
@@ -304,6 +304,21 @@ is_nvmf_device()
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
+# is_multipath_nvme_device
|
||||||
|
+# Check to see if this is a multipath nvme device
|
||||||
|
+#
|
||||||
|
+is_multipath_nvme_device()
|
||||||
|
+{
|
||||||
|
+ local res
|
||||||
|
+
|
||||||
|
+ res=`$FIND /sys/devices/virtual/nvme-subsystem -name $1 2>/dev/null`
|
||||||
|
+ if [[ ${#res} = 0 ]]; then
|
||||||
|
+ echo "no"
|
||||||
|
+ else
|
||||||
|
+ echo "yes"
|
||||||
|
+ fi
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
# get_link
|
||||||
|
# return the directory path that a link points to.
|
||||||
|
# The only parameter is the link name.
|
||||||
|
@@ -340,6 +355,32 @@ add_nvmf()
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
+add_multipath_nvme()
|
||||||
|
+{
|
||||||
|
+ local DEVNAME=$1
|
||||||
|
+
|
||||||
|
+ ctrl_name=$DEVNAME
|
||||||
|
+ local startctr=$ctr
|
||||||
|
+
|
||||||
|
+ local dir
|
||||||
|
+ for dir in `$FIND /sys/devices/virtual/nvme-subsystem -name "$ctrl_name"`; do
|
||||||
|
+ cd $dir
|
||||||
|
+ cd ..
|
||||||
|
+ for slave in `ls -d $PWD/nvme*`; do
|
||||||
|
+ slavedev=${slave##*/}
|
||||||
|
+ if [[ "$slavedev" != *nvme*n* ]] ; then
|
||||||
|
+ LOGICAL_NAMES[$ctr]=${slavedev}
|
||||||
|
+ ctr=$[$ctr + 1]
|
||||||
|
+ fi
|
||||||
|
+ done
|
||||||
|
+ done
|
||||||
|
+
|
||||||
|
+ if [[ "$startctr" = "$ctr" ]] ; then
|
||||||
|
+ LOGICAL_NAMES[$ctr]=$1
|
||||||
|
+ ctr=$[$ctr + 1]
|
||||||
|
+ fi
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
add_logical()
|
||||||
|
{
|
||||||
|
local DEVNAME=$1
|
||||||
|
@@ -487,31 +528,40 @@ while [[ -n $1 ]]; do
|
||||||
|
if [[ "$1" == *"dm-"* ]] ; then
|
||||||
|
add_logical $1
|
||||||
|
else
|
||||||
|
- if [[ "$1" == *"nvme-of"* ]]; then
|
||||||
|
+ if [[ "$1" == *"nvme-of"* ]] || [[ "$1" == *"namespace"* ]]; then
|
||||||
|
ctrl_name=`get_logical_device_name $1`
|
||||||
|
+ master_of_path=$1
|
||||||
|
else
|
||||||
|
ctrl_name=$1
|
||||||
|
ctrl_name=${ctrl_name##*/}
|
||||||
|
+ master_of_path=`get_of_device_name $1`
|
||||||
|
fi
|
||||||
|
+
|
||||||
|
+ if [[ -z $master_of_path ]]; then
|
||||||
|
+ echo "Device $1 does not appear to be valid." >&2
|
||||||
|
+ exit 1
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
ctrl_name="${ctrl_name%n[0-9]*}"
|
||||||
|
is_nvmf=$(is_nvmf_device $ctrl_name)
|
||||||
|
if [[ $is_nvmf = "yes" ]]; then
|
||||||
|
- if [[ "$1" == *"nvme-of"* ]]; then
|
||||||
|
- master_of_path=$1
|
||||||
|
- else
|
||||||
|
- master_of_path=`get_of_device_name $1`
|
||||||
|
- fi
|
||||||
|
-
|
||||||
|
- if [[ -z $master_of_path ]]; then
|
||||||
|
- echo "Device $1 does not appear to be valid." >&2
|
||||||
|
- exit 1
|
||||||
|
- fi
|
||||||
|
-
|
||||||
|
namespace_base=${master_of_path##*/}
|
||||||
|
DEVTYPE="nvme-of"
|
||||||
|
add_nvmf $ctrl_name
|
||||||
|
else
|
||||||
|
- add_logical $1
|
||||||
|
+ is_multipath_nvme=$(is_multipath_nvme_device $ctrl_name)
|
||||||
|
+ if [[ $is_multipath_nvme = "yes" ]]; then
|
||||||
|
+ if [[ "$master_of_path" == *namespace* ]] ; then
|
||||||
|
+ namespace_base=${master_of_path##*/}
|
||||||
|
+ else
|
||||||
|
+ echo "Device $1 does not appear to be valid." >&2
|
||||||
|
+ exit 1
|
||||||
|
+ fi
|
||||||
|
+ DEVTYPE="multi-nvme"
|
||||||
|
+ add_multipath_nvme $ctrl_name
|
||||||
|
+ else
|
||||||
|
+ add_logical $1
|
||||||
|
+ fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
@@ -534,8 +584,10 @@ if [[ ${#LOGICAL_NAMES[*]} -ne 0 ]]; then
|
||||||
|
if [[ -z ${OF_DEVPATH[$ctr]} ]]; then
|
||||||
|
# See if this is an OF pathname
|
||||||
|
OF_DEVPATH[$ctr]=`get_of_device_name ${LOGICAL_NAMES[$ctr]}`
|
||||||
|
- if [[ $DEVTYPE = "nvme-of" ]]; then
|
||||||
|
+ if [[ $DEVTYPE = "nvme-of" ]] || [[ $DEVTYPE = "multi-nvme" ]]; then
|
||||||
|
OF_DEVPATH[$ctr]=${OF_DEVPATH[$ctr]}/$namespace_base
|
||||||
|
+ else
|
||||||
|
+ OF_DEVPATH[$ctr]=${OF_DEVPATH[$ctr]}
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
OF_DEVPATH[$ctr]=${LOGICAL_NAMES[$ctr]}
|
||||||
|
--
|
||||||
|
2.35.3
|
|
@ -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
|
|
@ -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);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Name: powerpc-utils
|
Name: powerpc-utils
|
||||||
Version: 1.3.10
|
Version: 1.3.10
|
||||||
Release: 8%{?dist}
|
Release: 10%{?dist}
|
||||||
Summary: PERL-based scripts for maintaining and servicing PowerPC systems
|
Summary: PERL-based scripts for maintaining and servicing PowerPC systems
|
||||||
|
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
|
@ -45,23 +45,29 @@ Patch18: powerpc-utils-372599ed28d65a79d4c3b3405a8e04034eb58e09.patch
|
||||||
Patch19: powerpc-utils-e0928dc5e5375591a4cff6ffabc6063771288f59.patch
|
Patch19: powerpc-utils-e0928dc5e5375591a4cff6ffabc6063771288f59.patch
|
||||||
Patch20: powerpc-utils-d0bc79aedaf76eff09a5d1f399da09561a4d4d7d.patch
|
Patch20: powerpc-utils-d0bc79aedaf76eff09a5d1f399da09561a4d4d7d.patch
|
||||||
Patch21: powerpc-utils-7698adc945372e901c2bc3f7066a5a1c219bf1d8.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
|
||||||
|
# Support multiple dev paths for a nvme boot device
|
||||||
|
Patch24: 0001-scripts-bootlist-Support-multiple-dev-paths-for-a-nv.patch
|
||||||
|
|
||||||
ExclusiveArch: ppc %{power64}
|
ExclusiveArch: ppc %{power64}
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
BuildRequires: librtas-devel >= 1.4.0
|
BuildRequires: librtas-devel >= 1.4.0
|
||||||
BuildRequires: libservicelog-devel >= 1.0.1-2
|
BuildRequires: libservicelog-devel >= 1.0.1-2
|
||||||
BuildRequires: perl-generators
|
BuildRequires: perl-generators
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
BuildRequires: numactl-devel
|
BuildRequires: numactl-devel
|
||||||
|
|
||||||
# rtas_dump explicit dependency
|
# rtas_dump explicit dependency
|
||||||
Requires: perl(Data::Dumper)
|
Requires: perl(Data::Dumper)
|
||||||
Requires: %{name}-core = %{version}-%{release}
|
Requires: %{name}-core = %{version}-%{release}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
PERL-based scripts for maintaining and servicing PowerPC systems.
|
PERL-based scripts for maintaining and servicing PowerPC systems.
|
||||||
|
@ -131,6 +137,9 @@ ln -s serv_config.8 %{buildroot}%{_mandir}/man8/uspchrp.8
|
||||||
# deprecated, use sosreport instead
|
# deprecated, use sosreport instead
|
||||||
rm -f $RPM_BUILD_ROOT%{_sbindir}/snap $RPM_BUILD_ROOT%{_mandir}/man8/snap.8*
|
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
|
%post core
|
||||||
%systemd_post hcn-init.service
|
%systemd_post hcn-init.service
|
||||||
# update the smt.state file with current SMT
|
# update the smt.state file with current SMT
|
||||||
|
@ -158,6 +167,7 @@ systemctl enable hcn-init.service >/dev/null 2>&1 || :
|
||||||
%files core
|
%files core
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%dir %{_localstatedir}/lib/powerpc-utils
|
%dir %{_localstatedir}/lib/powerpc-utils
|
||||||
|
%dir /etc/drmgr.d/pmig
|
||||||
%config(noreplace) %{_localstatedir}/lib/powerpc-utils/smt.state
|
%config(noreplace) %{_localstatedir}/lib/powerpc-utils/smt.state
|
||||||
%{_unitdir}/smtstate.service
|
%{_unitdir}/smtstate.service
|
||||||
%{_unitdir}/smt_off.service
|
%{_unitdir}/smt_off.service
|
||||||
|
@ -235,6 +245,14 @@ systemctl enable hcn-init.service >/dev/null 2>&1 || :
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 30 2024 Than Ngo <than@redhat.com> - 1.3.10-10
|
||||||
|
- Resolves: RHEL-22830, Support multiple dev paths for a nvme boot device
|
||||||
|
|
||||||
|
* 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
|
* 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-16045, Support partial SMT level through SYS FS smt/control files
|
||||||
- Resolves: RHEL-11456, LPM hooks
|
- Resolves: RHEL-11456, LPM hooks
|
||||||
|
|
Loading…
Reference in New Issue