xref: /openbmc/linux/arch/arm64/include/asm/vmalloc.h (revision 35f752be)
1 #ifndef _ASM_ARM64_VMALLOC_H
2 #define _ASM_ARM64_VMALLOC_H
3 
4 #include <asm/page.h>
5 
6 #ifdef CONFIG_HAVE_ARCH_HUGE_VMAP
7 
8 #define arch_vmap_pud_supported arch_vmap_pud_supported
9 static inline bool arch_vmap_pud_supported(pgprot_t prot)
10 {
11 	/*
12 	 * Only 4k granule supports level 1 block mappings.
13 	 * SW table walks can't handle removal of intermediate entries.
14 	 */
15 	return IS_ENABLED(CONFIG_ARM64_4K_PAGES) &&
16 	       !IS_ENABLED(CONFIG_PTDUMP_DEBUGFS);
17 }
18 
19 #define arch_vmap_pmd_supported arch_vmap_pmd_supported
20 static inline bool arch_vmap_pmd_supported(pgprot_t prot)
21 {
22 	/* See arch_vmap_pud_supported() */
23 	return !IS_ENABLED(CONFIG_PTDUMP_DEBUGFS);
24 }
25 
26 #endif
27 
28 #endif /* _ASM_ARM64_VMALLOC_H */
29