powerpc/mm/slice: Remove slice_mm_new_context()
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Mon, 2 May 2016 12:56:07 +0000 (18:26 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 11 May 2016 11:54:00 +0000 (21:54 +1000)
The usage in mm mmu_context_nohash.c is bogus, because we set the
context.id value to MMU_NO_CONTEXT 4 lines previously in the same
function, meaning slice_mm_new_context() will always be true.

The book3s 64 usage was removed in the previous commit. So remove it as
unused.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/page_64.h
arch/powerpc/mm/mmu_context_nohash.c

index 77488857c26d518c8f70c89b36d738e70474519e..dd5f0712afa2539b7e484101839390fb804c9f26 100644 (file)
@@ -128,8 +128,6 @@ extern void slice_set_user_psize(struct mm_struct *mm, unsigned int psize);
 extern void slice_set_range_psize(struct mm_struct *mm, unsigned long start,
                                  unsigned long len, unsigned int psize);
 
-#define slice_mm_new_context(mm)       ((mm)->context.id == MMU_NO_CONTEXT)
-
 #endif /* __ASSEMBLY__ */
 #else
 #define slice_init()
@@ -151,7 +149,6 @@ do {                                                \
 
 #define slice_set_range_psize(mm, start, len, psize)   \
        slice_set_user_psize((mm), (psize))
-#define slice_mm_new_context(mm)       1
 #endif /* CONFIG_PPC_MM_SLICES */
 
 #ifdef CONFIG_HUGETLB_PAGE
index a36c43a2789362fc2fbe180c5c707eec99259f24..7d95bc402dba4b9ba411c5018091b262d4cd4cb6 100644 (file)
@@ -335,8 +335,7 @@ int init_new_context(struct task_struct *t, struct mm_struct *mm)
        mm->context.active = 0;
 
 #ifdef CONFIG_PPC_MM_SLICES
-       if (slice_mm_new_context(mm))
-               slice_set_user_psize(mm, mmu_virtual_psize);
+       slice_set_user_psize(mm, mmu_virtual_psize);
 #endif
 
        return 0;