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 #include <asm/pgtable.h> 7 8 #define IOREMAP_MAX_ORDER (PUD_SHIFT) 9 10 #define arch_vmap_pud_supported arch_vmap_pud_supported 11 static 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 17 static 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