arm64: mm: add param to force create_pgd_mapping() to use page mappings
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 29 Jun 2016 12:51:26 +0000 (14:51 +0200)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 1 Jul 2016 10:56:26 +0000 (11:56 +0100)
commit53e1b32910a3bc94d9f122321442b79b314219f8
tree3c229eca9be5bb61f266c3bde9a2144e37342b7b
parent7dd01aef055792260287c6708daf75aac3918f66
arm64: mm: add param to force create_pgd_mapping() to use page mappings

Add a bool parameter 'allow_block_mappings' to create_pgd_mapping() and
the various helper functions that it descends into, to give the caller
control over whether block entries may be used to create the mapping.

The UEFI runtime mapping routines will use this to avoid creating block
entries that would need to split up into page entries when applying the
permissions listed in the Memory Attributes firmware table.

This also replaces the block_mappings_allowed() helper function that was
added for DEBUG_PAGEALLOC functionality, but the resulting code is
functionally equivalent (given that debug_page_alloc does not operate on
EFI page table entries anyway)

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/mmu.h
arch/arm64/kernel/efi.c
arch/arm64/mm/mmu.c