Skip to content

Commit

Permalink
powerpc/mm/nohash: MM_SLICE is only used by book3s 64
Browse files Browse the repository at this point in the history
BOOKE code is dead code as per the Kconfig details. So make it simpler
by enabling MM_SLICE only for book3s_64. The changes w.r.t nohash is just
removing deadcode. W.r.t ppc64, 4k without hugetlb will now enable MM_SLICE.
But that is good, because we reduce one extra variant which probably is not
getting tested much.

Reviewed-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Aneesh Kumar K.V authored and Michael Ellerman committed Mar 31, 2017
1 parent adec9a2 commit b42279f
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 23 deletions.
5 changes: 0 additions & 5 deletions arch/powerpc/include/asm/mmu-book3e.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,6 @@ typedef struct {
unsigned int id;
unsigned int active;
unsigned long vdso_base;
#ifdef CONFIG_PPC_MM_SLICES
u64 low_slices_psize; /* SLB page size encodings */
u64 high_slices_psize; /* 4 bits per slice for now */
u16 user_psize; /* page size index */
#endif
#ifdef CONFIG_PPC_64K_PAGES
/* for 4K PTE fragment support */
void *pte_frag;
Expand Down
5 changes: 0 additions & 5 deletions arch/powerpc/include/asm/nohash/64/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@
#include <asm/nohash/pte-book3e.h>
#include <asm/pte-common.h>

#ifdef CONFIG_PPC_MM_SLICES
#define HAVE_ARCH_UNMAPPED_AREA
#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
#endif /* CONFIG_PPC_MM_SLICES */

#ifndef __ASSEMBLY__
/* pte_clear moved to later in this file */

Expand Down
7 changes: 0 additions & 7 deletions arch/powerpc/mm/hugetlbpage-book3e.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,9 @@ void book3e_hugetlb_preload(struct vm_area_struct *vma, unsigned long ea,

mm = vma->vm_mm;

#ifdef CONFIG_PPC_MM_SLICES
psize = get_slice_psize(mm, ea);
tsize = mmu_get_tsize(psize);
shift = mmu_psize_defs[psize].shift;
#else
psize = vma_mmu_pagesize(vma);
shift = __ilog2(psize);
tsize = shift - 10;
#endif

/*
* We can't be interrupted while we're setting up the MAS
* regusters or after we've confirmed that no tlb exists.
Expand Down
5 changes: 0 additions & 5 deletions arch/powerpc/mm/mmu_context_nohash.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,6 @@ int init_new_context(struct task_struct *t, struct mm_struct *mm)

mm->context.id = MMU_NO_CONTEXT;
mm->context.active = 0;

#ifdef CONFIG_PPC_MM_SLICES
slice_set_user_psize(mm, mmu_virtual_psize);
#endif

return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/Kconfig.cputype
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ config PPC_BOOK3E_MMU

config PPC_MM_SLICES
bool
default y if (!PPC_FSL_BOOK3E && PPC64 && HUGETLB_PAGE) || (PPC_STD_MMU_64 && PPC_64K_PAGES)
default y if PPC_STD_MMU_64
default n

config PPC_HAVE_PMU_SUPPORT
Expand Down

0 comments on commit b42279f

Please sign in to comment.