blob: e714b00fc0cac9c0150f7631838b1483b29e27da [file] [log] [blame]
Ingo Molnar1f059df2019-11-28 08:19:36 +01001#ifndef _ASM_X86_VMALLOC_H
2#define _ASM_X86_VMALLOC_H
3
Nicholas Piggin97dc2a12021-04-29 22:58:36 -07004#include <asm/cpufeature.h>
Nicholas Pigginbbc180a2021-04-29 22:58:26 -07005#include <asm/page.h>
Ingo Molnar186525b2019-11-29 08:17:25 +01006#include <asm/pgtable_areas.h>
7
Nicholas Pigginbbc180a2021-04-29 22:58:26 -07008#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP
Nicholas Piggin97dc2a12021-04-29 22:58:36 -07009static inline bool arch_vmap_p4d_supported(pgprot_t prot)
10{
11 return false;
12}
13
14static inline bool arch_vmap_pud_supported(pgprot_t prot)
15{
16#ifdef CONFIG_X86_64
17 return boot_cpu_has(X86_FEATURE_GBPAGES);
18#else
19 return false;
20#endif
21}
22
23static inline bool arch_vmap_pmd_supported(pgprot_t prot)
24{
25 return boot_cpu_has(X86_FEATURE_PSE);
26}
Nicholas Pigginbbc180a2021-04-29 22:58:26 -070027#endif
28
Ingo Molnar1f059df2019-11-28 08:19:36 +010029#endif /* _ASM_X86_VMALLOC_H */