arm64: Add support for ARCH_SUPPORTS_DEBUG_PAGEALLOC
authorLaura Abbott <labbott@fedoraproject.org>
Sat, 6 Feb 2016 00:24:47 +0000 (16:24 -0800)
committerAlex Shi <alex.shi@linaro.org>
Wed, 11 May 2016 14:19:20 +0000 (22:19 +0800)
commite4d0298cdff23a21e532291df7a4fb6e0a908be4
tree940fb34234cbf48d9d252ee32651aae4017d9d4f
parent65e670213029f7df5dd20407eecbe691aa078930
arm64: Add support for ARCH_SUPPORTS_DEBUG_PAGEALLOC

ARCH_SUPPORTS_DEBUG_PAGEALLOC provides a hook to map and unmap
pages for debugging purposes. This requires memory be mapped
with PAGE_SIZE mappings since breaking down larger mappings
at runtime will lead to TLB conflicts. Check if debug_pagealloc
is enabled at runtime and if so, map everyting with PAGE_SIZE
pages. Implement the functions to actually map/unmap the
pages at runtime.

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Laura Abbott <labbott@fedoraproject.org>
[catalin.marinas@arm.com: static annotation block_mappings_allowed() and #ifdef]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 83863f25e4b8214e994ef8b5647aad614d74b45d)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
arch/arm64/Kconfig
arch/arm64/mm/mmu.c
arch/arm64/mm/pageattr.c