arm64: pgtable: implement static [pte|pmd|pud]_offset variants
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 16 Feb 2016 12:52:37 +0000 (13:52 +0100)
committerAlex Shi <alex.shi@linaro.org>
Wed, 11 May 2016 14:36:46 +0000 (22:36 +0800)
commit4545faf8e5b81592ba597141d432ca7e2b52a43e
tree94cd10281087c057bb1e5a1956d21718587f87b1
parent1dd59fe47656335cd3c913e378718eb49b7b1b38
arm64: pgtable: implement static [pte|pmd|pud]_offset variants

The page table accessors pte_offset(), pud_offset() and pmd_offset()
rely on __va translations, so they can only be used after the linear
mapping has been installed. For the early fixmap and kasan init routines,
whose page tables are allocated statically in the kernel image, these
functions will return bogus values. So implement pte_offset_kimg(),
pmd_offset_kimg() and pud_offset_kimg(), which can be used instead
before any page tables have been allocated dynamically.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 6533945a32c762c5db70d7a3ec251a040b2d9661)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
arch/arm64/include/asm/pgtable.h