On 06/10/2019 10:08 AM, Nicholas Piggin wrote:
> Applying huge vmap to vmalloc requires vmalloc_to_page to walk huge
> pages. Define pud_large and pmd_large to support this.
>
> Signed-off-by: Nicholas Piggin <npig...@gmail.com>
> ---
> arch/arm64/include/asm/pgtable.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm64/include/asm/pgtable.h
> b/arch/arm64/include/asm/pgtable.h
> index 2c41b04708fe..30fe7b344bf7 100644
> --- a/arch/arm64/include/asm/pgtable.h
> +++ b/arch/arm64/include/asm/pgtable.h
> @@ -428,6 +428,7 @@ extern pgprot_t phys_mem_access_prot(struct file *file,
> unsigned long pfn,
> PMD_TYPE_TABLE)
> #define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \
> PMD_TYPE_SECT)
> +#define pmd_large(pmd) pmd_sect(pmd)
>
> #if defined(CONFIG_ARM64_64K_PAGES) || CONFIG_PGTABLE_LEVELS < 3
> #define pud_sect(pud) (0)
> @@ -438,6 +439,7 @@ extern pgprot_t phys_mem_access_prot(struct file *file,
> unsigned long pfn,
> #define pud_table(pud) ((pud_val(pud) & PUD_TYPE_MASK) == \
> PUD_TYPE_TABLE)
> #endif
> +#define pud_large(pud) pud_sect(pud)
>
> extern pgd_t init_pg_dir[PTRS_PER_PGD];
> extern pgd_t init_pg_end[];
Another series (I guess not merged yet) is trying to add these wrappers
on arm64 (https://patchwork.kernel.org/patch/10883887/).