From: Gabe Black Date: Wed, 19 Aug 2020 09:22:35 +0000 (-0700) Subject: kern: Stop using TheISA::GuestByteOrder in Linux::dumpDmesg. X-Git-Tag: v20.1.0.0~273 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fee00c6863747614236ff5817b714755bfad40c2;p=gem5.git kern: Stop using TheISA::GuestByteOrder in Linux::dumpDmesg. 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 Reviewed-by: Andreas Sandberg Maintainer: Andreas Sandberg Tested-by: kokoro --- diff --git a/src/kern/linux/helpers.cc b/src/kern/linux/helpers.cc index 4cbac41b7..028ad8ab0 100644 --- a/src/kern/linux/helpers.cc +++ b/src/kern/linux/helpers.cc @@ -109,12 +109,9 @@ Linux::dumpDmesg(ThreadContext *tc, std::ostream &os) return; } - uint32_t log_buf_len = - proxy.read(lb_len->address, TheISA::GuestByteOrder); - uint32_t log_first_idx = - proxy.read(first->address, TheISA::GuestByteOrder); - uint32_t log_next_idx = - proxy.read(next->address, TheISA::GuestByteOrder); + uint32_t log_buf_len = proxy.read(lb_len->address, bo); + uint32_t log_first_idx = proxy.read(first->address, bo); + uint32_t log_next_idx = proxy.read(next->address, bo); if (log_first_idx >= log_buf_len || log_next_idx >= log_buf_len) { warn("dmesg pointers/length corrupted\n");