ARM: 7677/1: LPAE: Fix mapping in alloc_init_section for unaligned addresses
commite651eab0af88aa7a281fe9e8c36c0846552aa7fc
authorSricharan R <r.sricharan@ti.com>
Mon, 18 Mar 2013 11:24:04 +0000 (18 12:24 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 22 Mar 2013 17:16:53 +0000 (22 17:16 +0000)
tree95dae96e080e1ac541bafcfb13eda43828007e45
parent7fb476c231bbc551ede5b4afb189d9ca5ab7406d
ARM: 7677/1: LPAE: Fix mapping in alloc_init_section for unaligned addresses

With LPAE enabled, alloc_init_section() does not map the entire
address space for unaligned addresses.

The issue also reproduced with CMA + LPAE. CMA tries to map 16MB
with page granularity mappings during boot. alloc_init_pte()
is called and out of 16MB, only 2MB gets mapped and rest remains
unaccessible.

Because of this OMAP5 boot is broken with CMA + LPAE enabled.
Fix the issue by ensuring that the entire addresses are
mapped.

Signed-off-by: R Sricharan <r.sricharan@ti.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christoffer Dall <chris@cloudcar.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Laura Abbott <lauraa@codeaurora.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Christoffer Dall <chris@cloudcar.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/mmu.c