Message ID | 1373387888-4137-1-git-send-email-swarren@wwwdotorg.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index d7229d2..3c8f4ac 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -585,7 +585,11 @@ EXPORT_SYMBOL(phys_mem_access_prot); static void __init *early_alloc_aligned(unsigned long sz, unsigned long align) { - void *ptr = __va(memblock_alloc(sz, align)); + phys_addr_t max_pa = min(memblock.memory.regions[0].base + + memblock.memory.regions[0].size, + arm_lowmem_limit); + phys_addr_t pa = memblock_alloc_base(sz, align, max_pa); + void *ptr = __va(pa); memset(ptr, 0, sz); return ptr; }