ARM: memblock: setup lowmem mappings using memblock
authorRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 27 Oct 2010 18:57:38 +0000 (19:57 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 28 Oct 2010 12:54:45 +0000 (13:54 +0100)
commit8df6516864462cb7a6f87d5a46df68fb0faebbb5
tree2db5634fa29b20bf6e64ce9446aef5a5e51b9c54
parentf25b4b4c89ff118df72421dd2cb080a6380896ac
ARM: memblock: setup lowmem mappings using memblock

Use memblock information to setup lowmem mappings rather than the
membank array.

This allows platforms to manipulate the memblock information during
initialization to reserve (and remove) memory from the kernel's view
of memory - and thus allowing platforms to setup their own private
mappings for this memory without causing problems with multiple
aliasing mappings:

size = min(size, SZ_2M);
base = memblock_alloc(size, min(align, SZ_2M));
memblock_free(base, size);
memblock_remove(base, size);

This is needed because multiple mappings of regions with differing
attributes (sharability, type, cache) are not permitted with ARMv6
and above.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/mmu.c