ARM: mm: Introduce virt_to_idmap() with an arch hook
authorSantosh Shilimkar <santosh.shilimkar@ti.com>
Wed, 31 Jul 2013 16:44:42 +0000 (12:44 -0400)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 15:19:27 +0000 (17:19 +0200)
commit63d832d826b75fec2ed062e5a5dc107c5a5db158
tree4dfc9408e4d134a271ec49553e10ba7d6e129ca0
parent0db5306859a69c38c695400c34bde7b7df5f1806
ARM: mm: Introduce virt_to_idmap() with an arch hook

On some PAE systems (e.g. TI Keystone), memory is above the
32-bit addressable limit, and the interconnect provides an
aliased view of parts of physical memory in the 32-bit addressable
space.  This alias is strictly for boot time usage, and is not
otherwise usable because of coherency limitations. On such systems,
the idmap mechanism needs to take this aliased mapping into account.

This patch introduces virt_to_idmap() and a arch function pointer which
can be populated by platform which needs it. Also populate necessary
idmap spots with now available virt_to_idmap(). Avoided #ifdef approach
to be compatible with multi-platform builds.

Most architecture won't touch it and in that case virt_to_idmap()
fall-back to existing virt_to_phys() macro.

Cc: Russell King <linux@arm.linux.org.uk>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
(cherry picked from commit 4dc9a81715973cb137a14399420bb35b0ed7d6ef)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm/include/asm/memory.h
arch/arm/kernel/smp.c
arch/arm/mm/idmap.c