2024-07-29 14:00:03 -07:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2019-11-28 08:19:36 +01:00
|
|
|
#ifndef _ASM_RISCV_VMALLOC_H
|
|
|
|
#define _ASM_RISCV_VMALLOC_H
|
|
|
|
|
2022-10-12 20:00:37 +08:00
|
|
|
#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP
|
|
|
|
|
2023-08-08 15:07:09 +02:00
|
|
|
extern bool pgtable_l4_enabled, pgtable_l5_enabled;
|
|
|
|
|
2022-10-12 20:00:37 +08: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 15:07:09 +02:00
|
|
|
return pgtable_l4_enabled || pgtable_l5_enabled;
|
2022-10-12 20:00:37 +08: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 21:50:15 +01:00
|
|
|
#endif
|
2022-10-12 20:00:37 +08:00
|
|
|
|
2019-11-28 08:19:36 +01:00
|
|
|
#endif /* _ASM_RISCV_VMALLOC_H */
|