File librtasevent-Fix-memory-page-address-print-issue.patch of Package librtas.22431

From f8a1f6df25263afc75cabb9c40ddb8e54cf086e3 Mon Sep 17 00:00:00 2001
From: Tyrel Datwyler <tyreld@linux.ibm.com>
Date: Thu, 16 Dec 2021 13:37:15 -0800
Subject: [PATCH] librtasevent: Fix memory page address print issue

References: bsc#1193846 ltc#193949
Patch-mainline: accepted, expected 2.0.3
Git-commit: f8a1f6df25263afc75cabb9c40ddb8e54cf086e3

The logical resource address lo and hi fields are currently printed by rtas_dump
infering that their naming refers to significance when in fact they refer to the
bit numbering.

lri_mem_addr_lo == Memory Logical Address (bit 0-31)
lri_mem_addr_hi == Memory Logical Address (bit 32-64))

Hence rtas_dump command is printing the logical address output with those two
fields swapped.

This patch fixes rtas_lri_scn fields so that we get legitimate addresses.

Current output:
--------------
Logical Address:        2ab0a0000000014f

Correct output:
-------------
Logical Address:  0x0000014F2AB0A000

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Reviewed-by: Nathan Lynch <nathanl@linux.ibm.com>
[tyreld: reworded commit message]
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
---
 librtasevent_src/rtas_lri.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/librtasevent_src/rtas_lri.c b/librtasevent_src/rtas_lri.c
index c8d8a99..9d60b8f 100644
--- a/librtasevent_src/rtas_lri.c
+++ b/librtasevent_src/rtas_lri.c
@@ -113,8 +113,8 @@ print_re_lri_scn(struct scn_header *shdr, int verbosity)
 
         case 0x40: 
             len += rtas_print("(Memory Page)\n" PRNT_FMT_ADDR, 
-                              "Logical Address:", lri->lri_mem_addr_hi,
-                              lri->lri_mem_addr_lo);
+                              "Logical Address:", lri->lri_mem_addr_lo,
+                              lri->lri_mem_addr_hi);
 	    break;
 
         case 0x41:
-- 
2.34.1

openSUSE Build Service is sponsored by