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 | |
Nicholas Piggin | 6f680e7 | 2021-04-29 22:58:39 -0700 | [diff] [blame] | 10 | #ifdef CONFIG_X86_64 |
| 11 | #define arch_vmap_pud_supported arch_vmap_pud_supported |
Nicholas Piggin | 97dc2a1 | 2021-04-29 22:58:36 -0700 | [diff] [blame] | 12 | static inline bool arch_vmap_pud_supported(pgprot_t prot) |
| 13 | { |
Nicholas Piggin | 97dc2a1 | 2021-04-29 22:58:36 -0700 | [diff] [blame] | 14 | return boot_cpu_has(X86_FEATURE_GBPAGES); |
Nicholas Piggin | 97dc2a1 | 2021-04-29 22:58:36 -0700 | [diff] [blame] | 15 | } |
Nicholas Piggin | 6f680e7 | 2021-04-29 22:58:39 -0700 | [diff] [blame] | 16 | #endif |
Nicholas Piggin | 97dc2a1 | 2021-04-29 22:58:36 -0700 | [diff] [blame] | 17 | |
Nicholas Piggin | 6f680e7 | 2021-04-29 22:58:39 -0700 | [diff] [blame] | 18 | #define arch_vmap_pmd_supported arch_vmap_pmd_supported |
Nicholas Piggin | 97dc2a1 | 2021-04-29 22:58:36 -0700 | [diff] [blame] | 19 | static inline bool arch_vmap_pmd_supported(pgprot_t prot) |
| 20 | { |
| 21 | return boot_cpu_has(X86_FEATURE_PSE); |
| 22 | } |
Nicholas Piggin | 6f680e7 | 2021-04-29 22:58:39 -0700 | [diff] [blame] | 23 | |
Nicholas Piggin | bbc180a | 2021-04-29 22:58:26 -0700 | [diff] [blame] | 24 | #endif |
| 25 | |
Ingo Molnar | 1f059df | 2019-11-28 08:19:36 +0100 | [diff] [blame] | 26 | #endif /* _ASM_X86_VMALLOC_H */ |