Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package powerpc-utils for openSUSE:Factory 
checked in at 2022-10-10 18:43:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/powerpc-utils (Old)
 and      /work/SRC/openSUSE:Factory/.powerpc-utils.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "powerpc-utils"

Mon Oct 10 18:43:49 2022 rev:130 rq:1007978 version:1.3.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/powerpc-utils/powerpc-utils.changes      
2022-08-02 22:09:47.457876103 +0200
+++ /work/SRC/openSUSE:Factory/.powerpc-utils.new.2275/powerpc-utils.changes    
2022-10-10 18:44:02.322801005 +0200
@@ -1,0 +2,7 @@
+Tue Oct  4 18:15:11 UTC 2022 - Michal Suchanek <msucha...@suse.com>
+
+- Fix "lsslot -c mem" output when LMB size is set to 4GB (bsc#1202777 
ltc#199300)
+  + lsslot-Fix-lsslot-c-mem-output-when-using-4GB-LMB-si.patch
+  + lsslot-Explicity-declare-that-lmb_address-be-display.patch
+
+-------------------------------------------------------------------

New:
----
  lsslot-Explicity-declare-that-lmb_address-be-display.patch
  lsslot-Fix-lsslot-c-mem-output-when-using-4GB-LMB-si.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ powerpc-utils.spec ++++++
--- /var/tmp/diff_new_pack.LMflgg/_old  2022-10-10 18:44:03.058802589 +0200
+++ /var/tmp/diff_new_pack.LMflgg/_new  2022-10-10 18:44:03.062802598 +0200
@@ -29,6 +29,8 @@
 Patch2:         ofpathname_powernv.patch
 Patch3:         fix_kexec_service_name_for_suse.patch
 Patch4:         libvirt-service-dep.patch
+Patch5:         lsslot-Explicity-declare-that-lmb_address-be-display.patch
+Patch6:         lsslot-Fix-lsslot-c-mem-output-when-using-4GB-LMB-si.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  libnuma-devel

++++++ lsslot-Explicity-declare-that-lmb_address-be-display.patch ++++++
>From e1f1deb06d9168a95a381a2236e1d8c693d3d229 Mon Sep 17 00:00:00 2001
From: Luciano Chavez <lnx1...@linux.ibm.com>
Date: Wed, 24 Aug 2022 21:17:54 -0500
Subject: [PATCH] lsslot: Explicity declare that lmb_address be displayed in
 hexadecimal

Upstream: Expected v1.3.11
Git-commit: e1f1deb06d9168a95a381a2236e1d8c693d3d229

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 <lnx1...@linux.ibm.com>
Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com>
---
 src/drmgr/lsslot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 ");
-- 
2.37.3


++++++ lsslot-Fix-lsslot-c-mem-output-when-using-4GB-LMB-si.patch ++++++
>From b1b9e76de0f3ab1dfcd9426779fa20fd77cd5625 Mon Sep 17 00:00:00 2001
From: Luciano Chavez <lnx1...@linux.ibm.com>
Date: Wed, 24 Aug 2022 21:11:32 -0500
Subject: [PATCH] lsslot: Fix lsslot -c mem output when using 4GB LMB size

Upstream: Expected v1.3.11
Git-commit: b1b9e76de0f3ab1dfcd9426779fa20fd77cd5625

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 <lnx1...@linux.ibm.com>
Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com>
---
 src/drmgr/drmem.h           | 2 +-
 src/drmgr/drslot_chrp_mem.c | 4 ++--
 src/drmgr/lsslot.c          | 4 ++--
 src/drmgr/ofdt.h            | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

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;
-- 
2.37.3

Reply via email to