xref: /linux/arch/riscv/include/asm/vmalloc.h (revision 55d0969c451159cff86949b38c39171cab962069)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #ifndef _ASM_RISCV_VMALLOC_H
3 #define _ASM_RISCV_VMALLOC_H
4 
5 #ifdef CONFIG_HAVE_ARCH_HUGE_VMAP
6 
7 extern bool pgtable_l4_enabled, pgtable_l5_enabled;
8 
9 #define IOREMAP_MAX_ORDER (PUD_SHIFT)
10 
11 #define arch_vmap_pud_supported arch_vmap_pud_supported
12 static inline bool arch_vmap_pud_supported(pgprot_t prot)
13 {
14 	return pgtable_l4_enabled || pgtable_l5_enabled;
15 }
16 
17 #define arch_vmap_pmd_supported arch_vmap_pmd_supported
18 static inline bool arch_vmap_pmd_supported(pgprot_t prot)
19 {
20 	return true;
21 }
22 
23 #endif
24 
25 #endif /* _ASM_RISCV_VMALLOC_H */
26