Message ID | 20161110174645.GB1041@n2100.armlinux.org.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 370581aeb871..ee8509e4329d 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -255,7 +255,11 @@ void __init arm_memblock_init(const struct machine_desc *mdesc) phys_initrd_start = phys_initrd_size = 0; } if (phys_initrd_size) { - memblock_reserve(phys_initrd_start, phys_initrd_size); + phys_addr_t start, size; + + start = round_down(phys_initrd_start, PAGE_SIZE); + end = round_up(phys_initrd_start + phys_initrd_size, PAGE_SIZE); + memblock_reserve(start, end - start); /* Now convert initrd to virtual addresses */ initrd_start = __phys_to_virt(phys_initrd_start);