xref: /openbmc/linux/arch/x86/include/asm/vmalloc.h (revision 8be98d2f2a0a262f8bf8a0bc1fdf522b3c7aab17)
11f059dfdSIngo Molnar #ifndef _ASM_X86_VMALLOC_H
21f059dfdSIngo Molnar #define _ASM_X86_VMALLOC_H
31f059dfdSIngo Molnar 
497dc2a15SNicholas Piggin #include <asm/cpufeature.h>
5bbc180a5SNicholas Piggin #include <asm/page.h>
6186525bdSIngo Molnar #include <asm/pgtable_areas.h>
7186525bdSIngo Molnar 
8bbc180a5SNicholas Piggin #ifdef CONFIG_HAVE_ARCH_HUGE_VMAP
997dc2a15SNicholas Piggin 
10*6f680e70SNicholas Piggin #ifdef CONFIG_X86_64
11*6f680e70SNicholas Piggin #define arch_vmap_pud_supported arch_vmap_pud_supported
arch_vmap_pud_supported(pgprot_t prot)1297dc2a15SNicholas Piggin static inline bool arch_vmap_pud_supported(pgprot_t prot)
1397dc2a15SNicholas Piggin {
1497dc2a15SNicholas Piggin 	return boot_cpu_has(X86_FEATURE_GBPAGES);
1597dc2a15SNicholas Piggin }
16*6f680e70SNicholas Piggin #endif
1797dc2a15SNicholas Piggin 
18*6f680e70SNicholas Piggin #define arch_vmap_pmd_supported arch_vmap_pmd_supported
arch_vmap_pmd_supported(pgprot_t prot)1997dc2a15SNicholas Piggin static inline bool arch_vmap_pmd_supported(pgprot_t prot)
2097dc2a15SNicholas Piggin {
2197dc2a15SNicholas Piggin 	return boot_cpu_has(X86_FEATURE_PSE);
2297dc2a15SNicholas Piggin }
23*6f680e70SNicholas Piggin 
24bbc180a5SNicholas Piggin #endif
25bbc180a5SNicholas Piggin 
261f059dfdSIngo Molnar #endif /* _ASM_X86_VMALLOC_H */
27