blob: 49ce331f3ac6b0fa6f7725d5e354261c99a9c7f9 [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 -07009
Nicholas Piggin6f680e72021-04-29 22:58:39 -070010#ifdef CONFIG_X86_64
11#define arch_vmap_pud_supported arch_vmap_pud_supported
Nicholas Piggin97dc2a12021-04-29 22:58:36 -070012static inline bool arch_vmap_pud_supported(pgprot_t prot)
13{
Nicholas Piggin97dc2a12021-04-29 22:58:36 -070014 return boot_cpu_has(X86_FEATURE_GBPAGES);
Nicholas Piggin97dc2a12021-04-29 22:58:36 -070015}
Nicholas Piggin6f680e72021-04-29 22:58:39 -070016#endif
Nicholas Piggin97dc2a12021-04-29 22:58:36 -070017
Nicholas Piggin6f680e72021-04-29 22:58:39 -070018#define arch_vmap_pmd_supported arch_vmap_pmd_supported
Nicholas Piggin97dc2a12021-04-29 22:58:36 -070019static inline bool arch_vmap_pmd_supported(pgprot_t prot)
20{
21 return boot_cpu_has(X86_FEATURE_PSE);
22}
Nicholas Piggin6f680e72021-04-29 22:58:39 -070023
Nicholas Pigginbbc180a2021-04-29 22:58:26 -070024#endif
25
Ingo Molnar1f059df2019-11-28 08:19:36 +010026#endif /* _ASM_X86_VMALLOC_H */