From: Russell King Date: Sun, 12 Aug 2012 23:22:28 +0000 (+0100) Subject: ARM: Allow arm_memblock_steal() to remove memory from any RAM region X-Git-Tag: firefly_0821_release~3680^2~1898^2~2^5~16 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7ac68a4c1de6aac5b0bb231fe6d8505ebe5686d9;p=firefly-linux-kernel-4.4.55.git ARM: Allow arm_memblock_steal() to remove memory from any RAM region Allow arm_memblock_steal() to remove memory from any RAM region, including highmem areas. This allows memory to be stolen from the very top of declared memory, including highmem areas, rather than our precious lowmem. Acked-by: Sascha Hauer Acked-by: Santosh Shilimkar Signed-off-by: Russell King --- diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 9aec41fa80ae..ad722f1208a5 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -324,7 +324,7 @@ phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align) BUG_ON(!arm_memblock_steal_permitted); - phys = memblock_alloc(size, align); + phys = memblock_alloc_base(size, align, MEMBLOCK_ALLOC_ANYWHERE); memblock_free(phys, size); memblock_remove(phys, size);