1 #ifndef _ASM_RISCV_VMALLOC_H 2 #define _ASM_RISCV_VMALLOC_H 3 4 #ifdef CONFIG_HAVE_ARCH_HUGE_VMAP 5 6 extern bool pgtable_l4_enabled, pgtable_l5_enabled; 7 8 #define IOREMAP_MAX_ORDER (PUD_SHIFT) 9 10 #define arch_vmap_pud_supported arch_vmap_pud_supported arch_vmap_pud_supported(pgprot_t prot)11static inline bool arch_vmap_pud_supported(pgprot_t prot) 12 { 13 return pgtable_l4_enabled || pgtable_l5_enabled; 14 } 15 16 #define arch_vmap_pmd_supported arch_vmap_pmd_supported arch_vmap_pmd_supported(pgprot_t prot)17static inline bool arch_vmap_pmd_supported(pgprot_t prot) 18 { 19 return true; 20 } 21 22 #endif 23 24 #endif /* _ASM_RISCV_VMALLOC_H */ 25