kern: Stop using TheISA::GuestByteOrder in Linux::dumpDmesg.
authorGabe Black <gabeblack@google.com>
Wed, 19 Aug 2020 09:22:35 +0000 (02:22 -0700)
committerGabe Black <gabeblack@google.com>
Thu, 20 Aug 2020 01:38:45 +0000 (01:38 +0000)
This value is already read from the system object in that same function.
We should use that instead of getting the value ourselves.

Change-Id: I0a442cd4892f50ad0179884bebf3eb52881c022f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32924
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/kern/linux/helpers.cc

index 4cbac41b731ae1658b4896b2897dd66c20bae2e1..028ad8ab0f9e5b3cf47a59650d2d4b45610d5631 100644 (file)
@@ -109,12 +109,9 @@ Linux::dumpDmesg(ThreadContext *tc, std::ostream &os)
         return;
     }
 
-    uint32_t log_buf_len =
-        proxy.read<uint32_t>(lb_len->address, TheISA::GuestByteOrder);
-    uint32_t log_first_idx =
-        proxy.read<uint32_t>(first->address, TheISA::GuestByteOrder);
-    uint32_t log_next_idx =
-        proxy.read<uint32_t>(next->address, TheISA::GuestByteOrder);
+    uint32_t log_buf_len = proxy.read<uint32_t>(lb_len->address, bo);
+    uint32_t log_first_idx = proxy.read<uint32_t>(first->address, bo);
+    uint32_t log_next_idx = proxy.read<uint32_t>(next->address, bo);
 
     if (log_first_idx >= log_buf_len || log_next_idx >= log_buf_len) {
         warn("dmesg pointers/length corrupted\n");