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)
committerSantosh Shilimkar <santosh.shilimkar@ti.com>
Fri, 11 Oct 2013 00:25:06 +0000 (20:25 -0400)
commit4dc9a81715973cb137a14399420bb35b0ed7d6ef
treecb54075d8504d655d9aa422dbe38e072e7a0cdc3
parentca5a45c06cd4764fb8510740f7fc550d9a0208d4
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>
arch/arm/include/asm/memory.h
arch/arm/kernel/smp.c
arch/arm/mm/idmap.c