aboutsummaryrefslogtreecommitdiff
path: root/target/xtensa/helper.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2018-06-25 09:42:13 -0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-07-02 15:41:14 +0200
commitb941329dc41bf677ab9f32b4ac9dabd20f4376b3 (patch)
tree6667127132b46a77fab9a645127a402ef0823fc2 /target/xtensa/helper.c
parentc108cc59dc4df978a7f4e7f34f2463b232522954 (diff)
downloadqemu-b941329dc41bf677ab9f32b4ac9dabd20f4376b3.zip
qemu-b941329dc41bf677ab9f32b4ac9dabd20f4376b3.tar.gz
qemu-b941329dc41bf677ab9f32b4ac9dabd20f4376b3.tar.bz2
hw/xtensa: Use the IEC binary prefix definitions
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ $ git grep -n '[<>][<>]= ?[1-5]0' and modified manually. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Acked-by: Max Filippov <jcmvbkbc@gmail.com> Message-Id: <20180625124238.25339-22-f4bug@amsat.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/xtensa/helper.c')
-rw-r--r--target/xtensa/helper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target/xtensa/helper.c b/target/xtensa/helper.c
index 34844ee..c9a6132 100644
--- a/target/xtensa/helper.c
+++ b/target/xtensa/helper.c
@@ -26,6 +26,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "cpu.h"
#include "exec/exec-all.h"
#include "exec/gdbstub.h"
@@ -726,10 +727,10 @@ static void dump_tlb(FILE *f, fprintf_function cpu_fprintf,
bool print_header = true;
if (sz >= 0x100000) {
- sz >>= 20;
+ sz /= MiB;
sz_text = "MB";
} else {
- sz >>= 10;
+ sz /= KiB;
sz_text = "KB";
}