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)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 18 Feb 2016 18:16:31 +0000 (18:16 +0000)
commit6533945a32c762c5db70d7a3ec251a040b2d9661
treecd0e4282a00f8acb9ed0e8d9f98fbf6ff025de20
parentab893fb9f1b17f02139bce547bb4b69e96b9ae16
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>
arch/arm64/include/asm/pgtable.h