aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/pgalloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/pgalloc.h')
-rw-r--r--arch/x86/include/asm/pgalloc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/include/asm/pgalloc.h b/arch/x86/include/asm/pgalloc.h
index aff42e1da6ee..263c142a6a6c 100644
--- a/arch/x86/include/asm/pgalloc.h
+++ b/arch/x86/include/asm/pgalloc.h
@@ -167,6 +167,8 @@ static inline void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pud,
167#if CONFIG_PGTABLE_LEVELS > 4 167#if CONFIG_PGTABLE_LEVELS > 4
168static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, p4d_t *p4d) 168static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, p4d_t *p4d)
169{ 169{
170 if (!pgtable_l5_enabled)
171 return;
170 paravirt_alloc_p4d(mm, __pa(p4d) >> PAGE_SHIFT); 172 paravirt_alloc_p4d(mm, __pa(p4d) >> PAGE_SHIFT);
171 set_pgd(pgd, __pgd(_PAGE_TABLE | __pa(p4d))); 173 set_pgd(pgd, __pgd(_PAGE_TABLE | __pa(p4d)));
172} 174}
@@ -191,7 +193,8 @@ extern void ___p4d_free_tlb(struct mmu_gather *tlb, p4d_t *p4d);
191static inline void __p4d_free_tlb(struct mmu_gather *tlb, p4d_t *p4d, 193static inline void __p4d_free_tlb(struct mmu_gather *tlb, p4d_t *p4d,
192 unsigned long address) 194 unsigned long address)
193{ 195{
194 ___p4d_free_tlb(tlb, p4d); 196 if (pgtable_l5_enabled)
197 ___p4d_free_tlb(tlb, p4d);
195} 198}
196 199
197#endif /* CONFIG_PGTABLE_LEVELS > 4 */ 200#endif /* CONFIG_PGTABLE_LEVELS > 4 */