[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PATCH v4 20/40] hw/hppa: Use the IEC binary prefix defin
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-trivial] [PATCH v4 20/40] hw/hppa: Use the IEC binary prefix definitions |
Date: |
Sun, 10 Jun 2018 22:14:41 -0300 |
It eases code review, unit is explicit.
Patch generated using:
$ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/
and modified manually.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/hppa/dino.c | 3 ++-
hw/hppa/machine.c | 10 +++++-----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c
index 26f2704cd5..564b938e3a 100644
--- a/hw/hppa/dino.c
+++ b/hw/hppa/dino.c
@@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "qapi/error.h"
#include "cpu.h"
#include "hw/hw.h"
@@ -76,7 +77,7 @@
/* #define xxx 0x200 - bit 9 not used */
#define RS232INT 0x400
-#define DINO_MEM_CHUNK_SIZE (8 * 1024 * 1024) /* 8MB */
+#define DINO_MEM_CHUNK_SIZE (8 * MiB)
#define DINO_PCI_HOST_BRIDGE(obj) \
OBJECT_CHECK(DinoState, (obj), TYPE_DINO_PCI_HOST_BRIDGE)
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 2ba26962f9..77513223b0 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -17,7 +17,7 @@
#include "hw/timer/i8254.h"
#include "hw/char/serial.h"
#include "hppa_sys.h"
-#include "qemu/cutils.h"
+#include "qemu/units.h"
#include "qapi/error.h"
#include "qemu/log.h"
@@ -178,8 +178,8 @@ static void machine_hppa_init(MachineState *machine)
}
qemu_log_mask(CPU_LOG_PAGE, "Kernel loaded at 0x%08" PRIx64
"-0x%08" PRIx64 ", entry at 0x%08" PRIx64
- ", size %ld kB.\n",
- kernel_low, kernel_high, kernel_entry, size / 1024);
+ ", size %llu kB\n",
+ kernel_low, kernel_high, kernel_entry, size / KiB);
if (kernel_cmdline) {
cpu[0]->env.gr[24] = 0x4000;
@@ -203,8 +203,8 @@ static void machine_hppa_init(MachineState *machine)
(1) Due to sign-extension problems and PDC,
put the initrd no higher than 1G.
(2) Reserve 64k for stack. */
- initrd_base = MIN(ram_size, 1024 * 1024 * 1024);
- initrd_base = initrd_base - 64 * 1024;
+ initrd_base = MIN(ram_size, 1 * GiB);
+ initrd_base = initrd_base - 64 * KiB;
initrd_base = (initrd_base - initrd_size) & TARGET_PAGE_MASK;
if (initrd_base < kernel_high) {
--
2.17.1
- Re: [Qemu-trivial] [Qemu-devel] [PATCH v4 11/40] hw/xen: Use the IEC binary prefix definitions, (continued)
[Qemu-trivial] [PATCH v4 12/40] hw/tpm: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-trivial] [PATCH v4 13/40] hw/block: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-trivial] [PATCH v4 15/40] hw/misc: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-trivial] [PATCH v4 16/40] hw/riscv: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-trivial] [PATCH v4 14/40] hw/display: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-trivial] [PATCH v4 17/40] hw/m68k: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-trivial] [PATCH v4 18/40] hw/sparc: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-trivial] [PATCH v4 20/40] hw/hppa: Use the IEC binary prefix definitions,
Philippe Mathieu-Daudé <=
[Qemu-trivial] [PATCH v4 19/40] hw/s390x: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-trivial] [PATCH v4 21/40] hw/xtensa: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-trivial] [PATCH v4 22/40] hw/alpha: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-trivial] [PATCH v4 23/40] hw/tricore: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-trivial] [PATCH v4 24/40] hw/microblaze: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-trivial] [PATCH v4 25/40] hw/nios2: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-trivial] [PATCH v4 26/40] hw/cris: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-trivial] [PATCH v4 27/40] hw/lm32: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-trivial] [PATCH v4 28/40] hw/sh4: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-trivial] [PATCH v4 29/40] hw/mips/r4k: Constify params_size, Philippe Mathieu-Daudé, 2018/06/10