lkml.org 
[lkml]   [2020]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 11/24] mm/hugetlb: Add vmemmap_pmd_huge macro for x86
Date
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
\
 
 \ /
  Last update: 2020-09-16 02:44    [W:0.101 / U:5.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site