ARM64: mm: Restore memblock limit when map_mem finished.
authorSteve Capper <steve.capper@linaro.org>
Tue, 30 Apr 2013 10:00:33 +0000 (11:00 +0100)
committerMark Brown <broonie@linaro.org>
Fri, 9 May 2014 11:02:47 +0000 (12:02 +0100)
commitf45009d07121dfa40d0b9c74c8364669dbe8c4af
tree9a154fab28cc782e3ff23bbf79336e3c36edfffb
parent1d85bc6282e21be5170b4b52413c097bce070258
ARM64: mm: Restore memblock limit when map_mem finished.

In paging_init the memblock limit is set to restrict any addresses
returned by early_alloc to fit within the initial direct kernel
mapping in swapper_pg_dir. This allows map_mem to allocate puds,
pmds and ptes from the initial direct kernel mapping.

The limit stays low after paging_init() though, meaning any
bootmem allocations will be from a restricted subset of memory.
Gigabyte huge pages, for instance, are normally allocated from
bootmem as their order (18) is too large for the default buddy
allocator (MAX_ORDER = 11).

This patch restores the memblock limit when map_mem has finished,
allowing gigabyte huge pages (and other objects) to be allocated
from all of bootmem.

Signed-off-by: Steve Capper <steve.capper@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/mm/mmu.c