Messages in this thread Patch in this message |  | | From | Muchun Song <> | Subject | [RFC PATCH 11/24] mm/hugetlb: Add vmemmap_pmd_huge macro for x86 | Date | Tue, 15 Sep 2020 20:59:34 +0800 |
| |
Use pmd_large instead of pmd_huge on x86, so we implement the vmemmap_pmd_huge macro.
Signed-off-by: Muchun Song <songmuchun@bytedance.com> --- arch/x86/include/asm/hugetlb.h | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/arch/x86/include/asm/hugetlb.h b/arch/x86/include/asm/hugetlb.h index f5e882f999cd..7c3eb60c2198 100644 --- a/arch/x86/include/asm/hugetlb.h +++ b/arch/x86/include/asm/hugetlb.h @@ -4,10 +4,17 @@ #include <asm/page.h> #include <asm-generic/hugetlb.h> +#include <asm/pgtable.h> #ifdef CONFIG_HUGETLB_PAGE_FREE_VMEMMAP #define VMEMMAP_HPAGE_SHIFT PMD_SHIFT #define arch_vmemmap_support_huge_mapping() boot_cpu_has(X86_FEATURE_PSE) + +#define vmemmap_pmd_huge vmemmap_pmd_huge +static inline bool vmemmap_pmd_huge(pmd_t *pmd) +{ + return pmd_large(*pmd); +} #endif #define hugepages_supported() boot_cpu_has(X86_FEATURE_PSE) -- 2.20.1
|  |