diff options
author | Kamil Rytarowski <n54@gmx.com> | 2017-09-11 22:16:10 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2017-09-26 09:06:02 +0300 |
commit | 39d96847c930930d888af8b433224ff41ccb27a1 (patch) | |
tree | 0ad88e2740ec665e8b69ac08df80175ff2eaec19 /hw/ppc | |
parent | 0f9f39d491946cde7fd5adee05bf90ab69bcc932 (diff) |
Replace round_page() with TARGET_PAGE_ALIGN()
This change fixes conflict with the DragonFly BSD headers.
Signed-off-by: Kamil Rytarowski <n54@gmx.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/ppc')
-rw-r--r-- | hw/ppc/mac_newworld.c | 11 | ||||
-rw-r--r-- | hw/ppc/mac_oldworld.c | 11 |
2 files changed, 6 insertions, 16 deletions
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index 33b46cb50b..d013c412d6 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -124,11 +124,6 @@ static uint64_t translate_kernel_address(void *opaque, uint64_t addr) return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR; } -static hwaddr round_page(hwaddr addr) -{ - return (addr + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK; -} - static void ppc_core99_reset(void *opaque) { PowerPCCPU *cpu = opaque; @@ -252,7 +247,7 @@ static void ppc_core99_init(MachineState *machine) } /* load initrd */ if (initrd_filename) { - initrd_base = round_page(kernel_base + kernel_size + KERNEL_GAP); + initrd_base = TARGET_PAGE_ALIGN(kernel_base + kernel_size + KERNEL_GAP); initrd_size = load_image_targphys(initrd_filename, initrd_base, ram_size - initrd_base); if (initrd_size < 0) { @@ -260,11 +255,11 @@ static void ppc_core99_init(MachineState *machine) initrd_filename); exit(1); } - cmdline_base = round_page(initrd_base + initrd_size); + cmdline_base = TARGET_PAGE_ALIGN(initrd_base + initrd_size); } else { initrd_base = 0; initrd_size = 0; - cmdline_base = round_page(kernel_base + kernel_size + KERNEL_GAP); + cmdline_base = TARGET_PAGE_ALIGN(kernel_base + kernel_size + KERNEL_GAP); } ppc_boot_device = 'm'; } else { diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 193b9047d9..61838c3e6f 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -66,11 +66,6 @@ static uint64_t translate_kernel_address(void *opaque, uint64_t addr) return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR; } -static hwaddr round_page(hwaddr addr) -{ - return (addr + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK; -} - static void ppc_heathrow_reset(void *opaque) { PowerPCCPU *cpu = opaque; @@ -187,7 +182,7 @@ static void ppc_heathrow_init(MachineState *machine) } /* load initrd */ if (initrd_filename) { - initrd_base = round_page(kernel_base + kernel_size + KERNEL_GAP); + initrd_base = TARGET_PAGE_ALIGN(kernel_base + kernel_size + KERNEL_GAP); initrd_size = load_image_targphys(initrd_filename, initrd_base, ram_size - initrd_base); if (initrd_size < 0) { @@ -195,11 +190,11 @@ static void ppc_heathrow_init(MachineState *machine) initrd_filename); exit(1); } - cmdline_base = round_page(initrd_base + initrd_size); + cmdline_base = TARGET_PAGE_ALIGN(initrd_base + initrd_size); } else { initrd_base = 0; initrd_size = 0; - cmdline_base = round_page(kernel_base + kernel_size + KERNEL_GAP); + cmdline_base = TARGET_PAGE_ALIGN(kernel_base + kernel_size + KERNEL_GAP); } ppc_boot_device = 'm'; } else { |