summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/slice.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2019-04-25 14:29:30 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2019-05-03 01:20:22 +1000
commitfca5c1e9eb5e263c1b4def0b5ae4ce5b2e1a9877 (patch)
treeb95a479cb21a65bfa62bbcafebf47fbd349b9b74 /arch/powerpc/mm/slice.c
parent6f60cc98df2be7f082bd786aa824ceabd24d24cb (diff)
downloadlinux-fca5c1e9eb5e263c1b4def0b5ae4ce5b2e1a9877.tar.gz
linux-fca5c1e9eb5e263c1b4def0b5ae4ce5b2e1a9877.tar.bz2
linux-fca5c1e9eb5e263c1b4def0b5ae4ce5b2e1a9877.zip
powerpc/mm: move slice_mask_for_size() into mmu.h
Move slice_mask_for_size() into subarch mmu.h Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> [mpe: Retain the BUG_ON()s, rather than converting to VM_BUG_ON()] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm/slice.c')
-rw-r--r--arch/powerpc/mm/slice.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c
index 8eb7e8b09c75..31de91b65a64 100644
--- a/arch/powerpc/mm/slice.c
+++ b/arch/powerpc/mm/slice.c
@@ -150,40 +150,6 @@ static void slice_mask_for_free(struct mm_struct *mm, struct slice_mask *ret,
__set_bit(i, ret->high_slices);
}
-#ifdef CONFIG_PPC_BOOK3S_64
-static struct slice_mask *slice_mask_for_size(mm_context_t *ctx, int psize)
-{
-#ifdef CONFIG_PPC_64K_PAGES
- if (psize == MMU_PAGE_64K)
- return mm_ctx_slice_mask_64k(&ctx);
-#endif
- if (psize == MMU_PAGE_4K)
- return mm_ctx_slice_mask_4k(&ctx);
-#ifdef CONFIG_HUGETLB_PAGE
- if (psize == MMU_PAGE_16M)
- return mm_ctx_slice_mask_16m(&ctx);
- if (psize == MMU_PAGE_16G)
- return mm_ctx_slice_mask_16g(&ctx);
-#endif
- BUG();
-}
-#elif defined(CONFIG_PPC_8xx)
-static struct slice_mask *slice_mask_for_size(mm_context_t *ctx, int psize)
-{
- if (psize == mmu_virtual_psize)
- return &ctx->mask_base_psize;
-#ifdef CONFIG_HUGETLB_PAGE
- if (psize == MMU_PAGE_512K)
- return &ctx->mask_512k;
- if (psize == MMU_PAGE_8M)
- return &ctx->mask_8m;
-#endif
- BUG();
-}
-#else
-#error "Must define the slice masks for page sizes supported by the platform"
-#endif
-
static bool slice_check_range_fits(struct mm_struct *mm,
const struct slice_mask *available,
unsigned long start, unsigned long len)