aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/mem.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2019-08-16 01:41:40 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2019-08-20 07:22:14 -0400
commitd9642117914c9d3f800b3bacc19d7e388b04edb4 (patch)
tree778ea9b7d2baecc695d15ba2a9091c01bb78a8e1 /arch/powerpc/mm/mem.c
parentad628a34ec4e3558bf838195f60bbaa4c2b68f2a (diff)
powerpc/mm: define empty update_mmu_cache() as static inline
Only BOOK3S and FSL_BOOK3E have a usefull update_mmu_cache(). For the others, just define it static inline. In the meantime, simplify the FSL_BOOK3E related ifdef as book3e_hugetlb_preload() only exists when CONFIG_PPC_FSL_BOOK3E is selected. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/668aba4db6b9af6d8a151174e11a4289f1a6bbcd.1565933217.git.christophe.leroy@c-s.fr
Diffstat (limited to 'arch/powerpc/mm/mem.c')
-rw-r--r--arch/powerpc/mm/mem.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 828c535e8fd2..ee8225cd2cd2 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -415,10 +415,10 @@ EXPORT_SYMBOL(flush_icache_user_range);
415 * 415 *
416 * This must always be called with the pte lock held. 416 * This must always be called with the pte lock held.
417 */ 417 */
418#ifdef CONFIG_PPC_BOOK3S
418void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, 419void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
419 pte_t *ptep) 420 pte_t *ptep)
420{ 421{
421#ifdef CONFIG_PPC_BOOK3S
422 /* 422 /*
423 * We don't need to worry about _PAGE_PRESENT here because we are 423 * We don't need to worry about _PAGE_PRESENT here because we are
424 * called with either mm->page_table_lock held or ptl lock held 424 * called with either mm->page_table_lock held or ptl lock held
@@ -456,13 +456,16 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
456 } 456 }
457 457
458 hash_preload(vma->vm_mm, address, is_exec, trap); 458 hash_preload(vma->vm_mm, address, is_exec, trap);
459}
459#endif /* CONFIG_PPC_BOOK3S */ 460#endif /* CONFIG_PPC_BOOK3S */
460#if (defined(CONFIG_PPC_BOOK3E_64) || defined(CONFIG_PPC_FSL_BOOK3E)) \ 461#if defined(CONFIG_PPC_FSL_BOOK3E) && defined(CONFIG_HUGETLB_PAGE)
461 && defined(CONFIG_HUGETLB_PAGE) 462void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
463 pte_t *ptep)
464{
462 if (is_vm_hugetlb_page(vma)) 465 if (is_vm_hugetlb_page(vma))
463 book3e_hugetlb_preload(vma, address, *ptep); 466 book3e_hugetlb_preload(vma, address, *ptep);
464#endif
465} 467}
468#endif
466 469
467/* 470/*
468 * System memory should not be in /proc/iomem but various tools expect it 471 * System memory should not be in /proc/iomem but various tools expect it