From acab36ca25101930b263dd9e8afd9b244354d338 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Sun, 27 Sep 2020 13:18:17 +0200 Subject: hw/mips: Simplify code using ROUND_UP(INITRD_PAGE_SIZE) Instead of using a INITRD_PAGE_MASK definition, use the simpler INITRD_PAGE_SIZE one which allows us to simplify the code by using directly the self-explicit ROUND_UP() macro. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20200927163943.614604-3-f4bug@amsat.org> --- include/hw/mips/mips.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/hw/mips/mips.h b/include/hw/mips/mips.h index 0af4c3d5d7..6c9c8805f3 100644 --- a/include/hw/mips/mips.h +++ b/include/hw/mips/mips.h @@ -2,8 +2,10 @@ #define HW_MIPS_H /* Definitions for mips board emulation. */ +#include "qemu/units.h" + /* Kernels can be configured with 64KB pages */ -#define INITRD_PAGE_MASK (~((1 << 16) - 1)) +#define INITRD_PAGE_SIZE (64 * KiB) #include "exec/memory.h" -- cgit v1.2.3-55-g7522