summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/pgtable.h
diff options
context:
space:
mode:
authorArd Biesheuvel2014-10-20 15:42:07 +0200
committerArd Biesheuvel2015-01-12 09:16:52 +0100
commit8ce837cee8f51fb0eacb32c85461ea2f0fafc9f8 (patch)
tree14bb68cb91e5890156381969a1f1f9ca87cd2047 /arch/arm64/include/asm/pgtable.h
parentarm64/mm: add explicit struct_mm argument to __create_mapping() (diff)
downloadkernel-qcow2-linux-8ce837cee8f51fb0eacb32c85461ea2f0fafc9f8.tar.gz
kernel-qcow2-linux-8ce837cee8f51fb0eacb32c85461ea2f0fafc9f8.tar.xz
kernel-qcow2-linux-8ce837cee8f51fb0eacb32c85461ea2f0fafc9f8.zip
arm64/mm: add create_pgd_mapping() to create private page tables
For UEFI, we need to install the memory mappings used for Runtime Services in a dedicated set of page tables. Add create_pgd_mapping(), which allows us to allocate and install those page table entries early. Reviewed-by: Will Deacon <will.deacon@arm.com> Tested-by: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'arch/arm64/include/asm/pgtable.h')
-rw-r--r--arch/arm64/include/asm/pgtable.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index 210d632aa5ad..59079248529d 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -264,6 +264,11 @@ static inline pmd_t pte_pmd(pte_t pte)
return __pmd(pte_val(pte));
}
+static inline pgprot_t mk_sect_prot(pgprot_t prot)
+{
+ return __pgprot(pgprot_val(prot) & ~PTE_TABLE_BIT);
+}
+
/*
* THP definitions.
*/