2024-07-29 14:00:03 -07:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2019-11-28 00:19:36 -07:00
|
|
|
#ifndef _ASM_RISCV_VMALLOC_H
|
|
|
|
#define _ASM_RISCV_VMALLOC_H
|
|
|
|
|
2022-10-12 05:00:37 -07:00
|
|
|
#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP
|
|
|
|
|
2023-08-08 06:07:09 -07:00
|
|
|
extern bool pgtable_l4_enabled, pgtable_l5_enabled;
|
|
|
|
|
2022-10-12 05:00:37 -07:00
|
|
|
#define IOREMAP_MAX_ORDER (PUD_SHIFT)
|
|
|
|
|
|
|
|
#define arch_vmap_pud_supported arch_vmap_pud_supported
|
|
|
|
static inline bool arch_vmap_pud_supported(pgprot_t prot)
|
|
|
|
{
|
2023-08-08 06:07:09 -07:00
|
|
|
return pgtable_l4_enabled || pgtable_l5_enabled;
|
2022-10-12 05:00:37 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
#define arch_vmap_pmd_supported arch_vmap_pmd_supported
|
|
|
|
static inline bool arch_vmap_pmd_supported(pgprot_t prot)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2024-02-27 13:50:15 -07:00
|
|
|
#endif
|
2022-10-12 05:00:37 -07:00
|
|
|
|
2019-11-28 00:19:36 -07:00
|
|
|
#endif /* _ASM_RISCV_VMALLOC_H */
|