Skip to contentSkip to conversation

target/ppc/mmu-radix64: Use correct string format in walk_tree()

PATCH In review Philippe Mathieu-Daudé 2 participants 3 messages Mar 19, 2024 – Mar 20, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/ppc/mmu-radix64: Use correct string format in walk_tree()

'mask', 'nlb' and 'base_addr' are all uin64_t types. Use the corresponding PRIx64 format.

Fixes d2066bc50d ("target/ppc: Check page dir/table base alignment")
---
 target/ppc/mmu-radix64.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
target/ppc/mmu-radix64.c +4 -4
index 5823e039e6..690dff7a49 100644
@@ -300,8 +300,8 @@ static int ppc_radix64_next_level(AddressSpace *as, vaddr eaddr,
 
         if (nlb & mask) {
             qemu_log_mask(LOG_GUEST_ERROR,
-                "%s: misaligned page dir/table base: 0x"TARGET_FMT_lx
-                " page dir size: 0x"TARGET_FMT_lx"\n",
+                "%s: misaligned page dir/table base: 0x%" PRIx64
+                " page dir size: 0x%" PRIx64 "\n",
                 __func__, nlb, mask + 1);
             nlb &= ~mask;
         }
@@ -324,8 +324,8 @@ static int ppc_radix64_walk_tree(AddressSpace *as, vaddr eaddr,
 
     if (base_addr & mask) {
         qemu_log_mask(LOG_GUEST_ERROR,
-            "%s: misaligned page dir base: 0x"TARGET_FMT_lx
-            " page dir size: 0x"TARGET_FMT_lx"\n",
+            "%s: misaligned page dir base: 0x%" PRIx64
+            " page dir size: 0x%" PRIx64 "\n",
             __func__, base_addr, mask + 1);
         base_addr &= ~mask;
     }
Signature · 1 line
2.41.0
#1 lore raw

+Anton

Quoted 35 lines · Philippe Mathieu-Daudé

'mask', 'nlb' and 'base_addr' are all uin64_t types. Use the corresponding PRIx64 format.

Fixes d2066bc50d ("target/ppc: Check page dir/table base alignment")
---
  target/ppc/mmu-radix64.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
target/ppc/mmu-radix64.c +4 -4
index 5823e039e6..690dff7a49 100644
@@ -300,8 +300,8 @@ static int ppc_radix64_next_level(AddressSpace *as, vaddr eaddr,
 
          if (nlb & mask) {
              qemu_log_mask(LOG_GUEST_ERROR,
-                "%s: misaligned page dir/table base: 0x"TARGET_FMT_lx
-                " page dir size: 0x"TARGET_FMT_lx"\n",
+                "%s: misaligned page dir/table base: 0x%" PRIx64
+                " page dir size: 0x%" PRIx64 "\n",
                  __func__, nlb, mask + 1);
              nlb &= ~mask;
          }
@@ -324,8 +324,8 @@ static int ppc_radix64_walk_tree(AddressSpace *as, vaddr eaddr,
 
      if (base_addr & mask) {
          qemu_log_mask(LOG_GUEST_ERROR,
-            "%s: misaligned page dir base: 0x"TARGET_FMT_lx
-            " page dir size: 0x"TARGET_FMT_lx"\n",
+            "%s: misaligned page dir base: 0x%" PRIx64
+            " page dir size: 0x%" PRIx64 "\n",
              __func__, base_addr, mask + 1);
          base_addr &= ~mask;
      }
#2 lore raw

Thanks, I can put this in the ppc tree.

Thanks,
Nick

Quoted 38 lines · Philippe Mathieu-Daudé

+Anton

Quoted 35 lines · Philippe Mathieu-Daudé

'mask', 'nlb' and 'base_addr' are all uin64_t types. Use the corresponding PRIx64 format.

Fixes d2066bc50d ("target/ppc: Check page dir/table base alignment")
---
  target/ppc/mmu-radix64.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
target/ppc/mmu-radix64.c +4 -4
index 5823e039e6..690dff7a49 100644
@@ -300,8 +300,8 @@ static int ppc_radix64_next_level(AddressSpace *as, vaddr eaddr,
 
          if (nlb & mask) {
              qemu_log_mask(LOG_GUEST_ERROR,
-                "%s: misaligned page dir/table base: 0x"TARGET_FMT_lx
-                " page dir size: 0x"TARGET_FMT_lx"\n",
+                "%s: misaligned page dir/table base: 0x%" PRIx64
+                " page dir size: 0x%" PRIx64 "\n",
                  __func__, nlb, mask + 1);
              nlb &= ~mask;
          }
@@ -324,8 +324,8 @@ static int ppc_radix64_walk_tree(AddressSpace *as, vaddr eaddr,
 
      if (base_addr & mask) {
          qemu_log_mask(LOG_GUEST_ERROR,
-            "%s: misaligned page dir base: 0x"TARGET_FMT_lx
-            " page dir size: 0x"TARGET_FMT_lx"\n",
+            "%s: misaligned page dir base: 0x%" PRIx64
+            " page dir size: 0x%" PRIx64 "\n",
              __func__, base_addr, mask + 1);
          base_addr &= ~mask;
      }