Auto sync2gitlab import of powerpc-utils-1.3.10-2.el8.src.rpm
This commit is contained in:
parent
aee24e4baf
commit
c8c41e5ca2
14
nvsetenv
14
nvsetenv
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$1" = "--version" ]; then
|
||||
echo This version of nvsetenv is just a wrapper to invoke nvram
|
||||
exit 0
|
||||
fi
|
||||
if [ -z "$1" ]; then
|
||||
nvram --print-config
|
||||
elif [ -z "$2" ]; then
|
||||
nvram --print-config="$1"
|
||||
else
|
||||
nvram --update-config "$1"="$2"
|
||||
fi
|
||||
exit $?
|
98
powerpc-utils-b1b9e7-LMB_size_4GB.patch
Normal file
98
powerpc-utils-b1b9e7-LMB_size_4GB.patch
Normal file
@ -0,0 +1,98 @@
|
||||
commit b1b9e76de0f3ab1dfcd9426779fa20fd77cd5625
|
||||
Author: Luciano Chavez <lnx1138@linux.ibm.com>
|
||||
Date: Wed Aug 24 21:11:32 2022 -0500
|
||||
|
||||
lsslot: Fix lsslot -c mem output when using 4GB LMB size
|
||||
|
||||
When using a LMB size of 4GB, the output of lsslot -c mem would get
|
||||
reported incorrectly as:
|
||||
|
||||
Dynamic Reconfiguration Memory (LMB size 0x0)
|
||||
:
|
||||
DRC Index: 80000001 Address: 100000000
|
||||
Removable: No Associativity: (index: 1) 0 1 4 9
|
||||
Section(s):
|
||||
|
||||
This patch changes the declaration of the _node_u._smem._lmb_size from
|
||||
a uint32_t to uint64_t to store the value properly. Any variables that
|
||||
store the lmb_size are also declared as uint64_t. In addition, we
|
||||
use the PRIx64 macro in printf statements to properly print the
|
||||
lmb_size value.
|
||||
|
||||
The patch also includes a necessary change to declare the global
|
||||
variable block_sz_bytes as a uint64_t to fix an infinite loop in
|
||||
the function get_mem_scns() when the above changes were introduced.
|
||||
|
||||
Signed-off-by: Luciano Chavez <lnx1138@linux.ibm.com>
|
||||
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
|
||||
|
||||
diff --git a/src/drmgr/drmem.h b/src/drmgr/drmem.h
|
||||
index db5a47f..48108c5 100644
|
||||
--- a/src/drmgr/drmem.h
|
||||
+++ b/src/drmgr/drmem.h
|
||||
@@ -58,7 +58,7 @@ struct drconf_mem_v2 {
|
||||
#define LMB_REVERSE_SORT 1
|
||||
#define LMB_RANDOM_SORT 2
|
||||
|
||||
-extern int block_sz_bytes;
|
||||
+extern uint64_t block_sz_bytes;
|
||||
|
||||
struct lmb_list_head *get_lmbs(unsigned int);
|
||||
void free_lmbs(struct lmb_list_head *);
|
||||
diff --git a/src/drmgr/drslot_chrp_mem.c b/src/drmgr/drslot_chrp_mem.c
|
||||
index 3b78723..d37ee80 100644
|
||||
--- a/src/drmgr/drslot_chrp_mem.c
|
||||
+++ b/src/drmgr/drslot_chrp_mem.c
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "drmem.h"
|
||||
#include "common_numa.h"
|
||||
|
||||
-int block_sz_bytes = 0;
|
||||
+uint64_t block_sz_bytes = 0;
|
||||
static char *state_strs[] = {"offline", "online"};
|
||||
|
||||
static char *usagestr = "-c mem {-a | -r} {-q <quantity> -p {variable_weight | ent_capacity} | {-q <quantity> | -s [<drc_name> | <drc_index>]}}";
|
||||
@@ -118,7 +118,7 @@ free_lmbs(struct lmb_list_head *lmb_list)
|
||||
static int
|
||||
get_mem_scns(struct dr_node *lmb)
|
||||
{
|
||||
- uint32_t lmb_sz = lmb->lmb_size;
|
||||
+ uint64_t lmb_sz = lmb->lmb_size;
|
||||
uint64_t phys_addr = lmb->lmb_address;
|
||||
uint32_t mem_scn;
|
||||
int rc = 0;
|
||||
diff --git a/src/drmgr/lsslot.c b/src/drmgr/lsslot.c
|
||||
index 87f876e..83e9e85 100644
|
||||
--- a/src/drmgr/lsslot.c
|
||||
+++ b/src/drmgr/lsslot.c
|
||||
@@ -741,7 +741,7 @@ int print_drconf_mem(struct lmb_list_head *lmb_list)
|
||||
if (usr_drc_name)
|
||||
drc_index = strtol(usr_drc_name, NULL, 0);
|
||||
|
||||
- printf("Dynamic Reconfiguration Memory (LMB size 0x%x)\n",
|
||||
+ printf("Dynamic Reconfiguration Memory (LMB size 0x%"PRIx64")\n",
|
||||
lmb_list->lmbs->lmb_size);
|
||||
|
||||
for (lmb = lmb_list->lmbs; lmb; lmb = lmb->next) {
|
||||
@@ -808,7 +808,7 @@ int lsslot_chrp_mem(void)
|
||||
if (lmb_list->drconf_buf) {
|
||||
print_drconf_mem(lmb_list);
|
||||
} else {
|
||||
- printf("lmb size: 0x%x\n", lmb_list->lmbs->lmb_size);
|
||||
+ printf("lmb size: 0x%"PRIx64"\n", lmb_list->lmbs->lmb_size);
|
||||
printf("%-20s %-5s %c %s\n", "Memory Node", "Name", 'R',
|
||||
"Sections");
|
||||
printf("%-20s %-5s %c %s\n", "-----------", "----", '-',
|
||||
diff --git a/src/drmgr/ofdt.h b/src/drmgr/ofdt.h
|
||||
index 26c943a..bd90810 100644
|
||||
--- a/src/drmgr/ofdt.h
|
||||
+++ b/src/drmgr/ofdt.h
|
||||
@@ -94,7 +94,7 @@ struct dr_node {
|
||||
union {
|
||||
struct mem_info {
|
||||
uint64_t _address;
|
||||
- uint32_t _lmb_size;
|
||||
+ uint64_t _lmb_size;
|
||||
uint32_t _lmb_aa_index;
|
||||
struct mem_scn *_mem_scns;
|
||||
struct of_node *_of_node;
|
29
powerpc-utils-e1f1de-lmb_address_in_hexadecimal.patch
Normal file
29
powerpc-utils-e1f1de-lmb_address_in_hexadecimal.patch
Normal file
@ -0,0 +1,29 @@
|
||||
commit e1f1deb06d9168a95a381a2236e1d8c693d3d229
|
||||
Author: Luciano Chavez <lnx1138@linux.ibm.com>
|
||||
Date: Wed Aug 24 21:17:54 2022 -0500
|
||||
|
||||
lsslot: Explicity declare that lmb_address be displayed in hexadecimal
|
||||
|
||||
A printf statement used is lsslot.c was specifying the macro PRIu64 to
|
||||
display the lmb_address. Depending on the compilation, this would
|
||||
either display as a hexadecimal or decimal value.
|
||||
|
||||
This patch replaces PRIu64 with PRIx64 to explicitly declare to print
|
||||
the value as hexadecimal as that was is normally expected of an address.
|
||||
|
||||
Signed-off-by: Luciano Chavez <lnx1138@linux.ibm.com>
|
||||
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
|
||||
|
||||
diff --git a/src/drmgr/lsslot.c b/src/drmgr/lsslot.c
|
||||
index 7ea0f8b..87f876e 100644
|
||||
--- a/src/drmgr/lsslot.c
|
||||
+++ b/src/drmgr/lsslot.c
|
||||
@@ -756,7 +756,7 @@ int print_drconf_mem(struct lmb_list_head *lmb_list)
|
||||
printf("%s: %s\n", lmb->drc_name,
|
||||
lmb->is_owned ? "" : "Not Owned");
|
||||
|
||||
- printf(" DRC Index: %x Address: %"PRIu64"\n",
|
||||
+ printf(" DRC Index: %x Address: %"PRIx64"\n",
|
||||
lmb->drc_index, lmb->lmb_address);
|
||||
printf(" Removable: %s Associativity: ",
|
||||
lmb->is_removable ? "Yes" : "No ");
|
@ -1,15 +1,17 @@
|
||||
Name: powerpc-utils
|
||||
Version: 1.3.10
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: PERL-based scripts for maintaining and servicing PowerPC systems
|
||||
|
||||
Group: System Environment/Base
|
||||
License: GPLv2
|
||||
URL: https://github.com/ibm-power-utilities/powerpc-utils
|
||||
Source0: https://github.com/ibm-power-utilities/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: nvsetenv
|
||||
Patch0: powerpc-utils-1.3.10-manpages.patch
|
||||
Patch1: powerpc-utils-1.3.10-distro.patch
|
||||
# bz#2121470, Fix lsslot -c mem output when using 4GB LMB size
|
||||
Patch3: powerpc-utils-b1b9e7-LMB_size_4GB.patch
|
||||
Patch4: powerpc-utils-e1f1de-lmb_address_in_hexadecimal.patch
|
||||
|
||||
ExclusiveArch: ppc %{power64}
|
||||
|
||||
@ -64,7 +66,6 @@ make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make install DESTDIR=$RPM_BUILD_ROOT FILES= RCSCRIPTS=
|
||||
install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/nvsetenv
|
||||
|
||||
#define pkgdocdir {_datadir}/doc/{name}-{version}
|
||||
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||
@ -189,6 +190,9 @@ systemctl enable hcn-init.service >/dev/null 2>&1 || :
|
||||
%{_mandir}/man8/lparnumascore.8*
|
||||
|
||||
%changelog
|
||||
* Fri Oct 21 2022 Than Ngo <than@redhat.com> - 1.3.10-2
|
||||
- Resolves: #2121481, Fix lsslot -c mem output when using 4GB LMB size
|
||||
|
||||
* Mon Jun 06 2022 Than Ngo <than@redhat.com> - 1.3.10-1
|
||||
- Resolves: #2051330, Linux Hybrid Network Virtualization update
|
||||
- Resolves: #2083469, smtstate --save command failed
|
||||
|
Loading…
Reference in New Issue
Block a user