arm64: Add support for CONFIG_DEBUG_VIRTUAL
authorLaura Abbott <labbott@redhat.com>
Tue, 10 Jan 2017 21:35:50 +0000 (13:35 -0800)
committerWill Deacon <will.deacon@arm.com>
Thu, 12 Jan 2017 15:05:39 +0000 (15:05 +0000)
commitec6d06efb0bac6cd92846e42d1afe5b98b57e7c2
treea09267b07514bc3136eec83eb7a40ff4d22b2de9
parent2077be6783b5936c3daa838d8addbb635667927f
arm64: Add support for CONFIG_DEBUG_VIRTUAL

x86 has an option CONFIG_DEBUG_VIRTUAL to do additional checks
on virt_to_phys calls. The goal is to catch users who are calling
virt_to_phys on non-linear addresses immediately. This inclues callers
using virt_to_phys on image addresses instead of __pa_symbol. As features
such as CONFIG_VMAP_STACK get enabled for arm64, this becomes increasingly
important. Add checks to catch bad virt_to_phys usage.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/Kconfig
arch/arm64/include/asm/memory.h
arch/arm64/mm/Makefile
arch/arm64/mm/physaddr.c [new file with mode: 0644]