Ingo Molnar | 1f059df | 2019-11-28 08:19:36 +0100 | [diff] [blame] | 1 | #ifndef _ASM_X86_VMALLOC_H |
| 2 | #define _ASM_X86_VMALLOC_H |
| 3 | |
Nicholas Piggin | 97dc2a1 | 2021-04-29 22:58:36 -0700 | [diff] [blame^] | 4 | #include <asm/cpufeature.h> |
Nicholas Piggin | bbc180a | 2021-04-29 22:58:26 -0700 | [diff] [blame] | 5 | #include <asm/page.h> |
Ingo Molnar | 186525b | 2019-11-29 08:17:25 +0100 | [diff] [blame] | 6 | #include <asm/pgtable_areas.h> |
| 7 | |
Nicholas Piggin | bbc180a | 2021-04-29 22:58:26 -0700 | [diff] [blame] | 8 | #ifdef CONFIG_HAVE_ARCH_HUGE_VMAP |
Nicholas Piggin | 97dc2a1 | 2021-04-29 22:58:36 -0700 | [diff] [blame^] | 9 | static inline bool arch_vmap_p4d_supported(pgprot_t prot) |
| 10 | { |
| 11 | return false; |
| 12 | } |
| 13 | |
| 14 | static 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 | |
| 23 | static inline bool arch_vmap_pmd_supported(pgprot_t prot) |
| 24 | { |
| 25 | return boot_cpu_has(X86_FEATURE_PSE); |
| 26 | } |
Nicholas Piggin | bbc180a | 2021-04-29 22:58:26 -0700 | [diff] [blame] | 27 | #endif |
| 28 | |
Ingo Molnar | 1f059df | 2019-11-28 08:19:36 +0100 | [diff] [blame] | 29 | #endif /* _ASM_X86_VMALLOC_H */ |