arm64: Fix for the arm64 kern_addr_valid() function
authorDave Anderson <anderson@redhat.com>
Tue, 15 Apr 2014 17:53:24 +0000 (18:53 +0100)
committerMark Brown <broonie@linaro.org>
Wed, 23 Jul 2014 23:51:40 +0000 (00:51 +0100)
commit39cbf100c68a8eb833aa164eb925460955617b73
tree781fc777e621eef119aaf24e0bb6bdf165a69c03
parent21b549b0dd52728a10687a233ef8266aa4d4c8a1
arm64: Fix for the arm64 kern_addr_valid() function

Fix for the arm64 kern_addr_valid() function to recognize
virtual addresses in the kernel logical memory map.  The
function fails as written because it does not check whether
the addresses in that region are mapped at the pmd level to
2MB or 512MB pages, continues the page table walk to the
pte level, and issues a garbage value to pfn_valid().

Tested on 4K-page and 64K-page kernels.

Signed-off-by: Dave Anderson <anderson@redhat.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit da6e4cb67c6dd1f72257c0a4a97c26dc4e80d3a7)
Signed-off-by: Mark Brown <broonie@linaro.org>
arch/arm64/include/asm/pgtable.h
arch/arm64/mm/mmu.c