summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/hugetlb.h
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2018-03-07 04:37:17 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2018-03-13 15:43:08 +0300
commit014a32b30e9d81b47ef82b9995b52c3a0c8b4082 (patch)
tree95876b99824a29ce76b8741b56084fb33c0bbd05 /arch/powerpc/include/asm/hugetlb.h
parentd262bd5a73998252d1cdf632bedaf1ca540839d8 (diff)
downloadlinux-014a32b30e9d81b47ef82b9995b52c3a0c8b4082.tar.xz
powerpc/mm/slice: remove radix calls to the slice code
This is a tidy up which removes radix MMU calls into the slice code. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/hugetlb.h')
-rw-r--r--arch/powerpc/include/asm/hugetlb.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/include/asm/hugetlb.h b/arch/powerpc/include/asm/hugetlb.h
index 1a4847f67ea8..48f2ed2a71ae 100644
--- a/arch/powerpc/include/asm/hugetlb.h
+++ b/arch/powerpc/include/asm/hugetlb.h
@@ -89,17 +89,17 @@ pte_t *huge_pte_offset_and_shift(struct mm_struct *mm,
void flush_dcache_icache_hugepage(struct page *page);
-#if defined(CONFIG_PPC_MM_SLICES)
-int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr,
+int slice_is_hugepage_only_range(struct mm_struct *mm, unsigned long addr,
unsigned long len);
-#else
+
static inline int is_hugepage_only_range(struct mm_struct *mm,
unsigned long addr,
unsigned long len)
{
+ if (IS_ENABLED(CONFIG_PPC_MM_SLICES) && !radix_enabled())
+ return slice_is_hugepage_only_range(mm, addr, len);
return 0;
}
-#endif
void book3e_hugetlb_preload(struct vm_area_struct *vma, unsigned long ea,
pte_t pte);