]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: Allow arm_memblock_steal() to remove memory from any RAM region
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 12 Aug 2012 23:22:28 +0000 (00:22 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 12 Aug 2012 23:22:28 +0000 (00:22 +0100)
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 <s.hauer@pengutronix.de>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/init.c

index 9aec41fa80ae31a23429db805bc1800fd7b19cbd..ad722f1208a57d21cae7ebca50dbddc2251d8d82 100644 (file)
@@ -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);