diff mbox

powerpc/mm/slice: Remove slice_mm_new_context

Message ID 1462193767-6429-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com (mailing list archive)
State Accepted
Headers show

Commit Message

Aneesh Kumar K.V May 2, 2016, 12:56 p.m. UTC
The existing usage is bogus, because we set the context.id value
in the same function. The book3s 64 got removed in the old patch.
Hence remove the redundant definition.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 arch/powerpc/include/asm/page_64.h   | 3 ---
 arch/powerpc/mm/mmu_context_nohash.c | 3 +--
 2 files changed, 1 insertion(+), 5 deletions(-)

Comments

Michael Ellerman May 4, 2016, 10:40 p.m. UTC | #1
On Mon, 2016-02-05 at 12:56:07 UTC, "Aneesh Kumar K.V" wrote:
> The existing usage is bogus, because we set the context.id value
> in the same function. The book3s 64 got removed in the old patch.
> Hence remove the redundant definition.
> 
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/b171b980bd7a88bfb48c9c6d02

cheers
diff mbox

Patch

diff --git a/arch/powerpc/include/asm/page_64.h b/arch/powerpc/include/asm/page_64.h
index 77488857c26d..dd5f0712afa2 100644
--- a/arch/powerpc/include/asm/page_64.h
+++ b/arch/powerpc/include/asm/page_64.h
@@ -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
diff --git a/arch/powerpc/mm/mmu_context_nohash.c b/arch/powerpc/mm/mmu_context_nohash.c
index a36c43a27893..7d95bc402dba 100644
--- a/arch/powerpc/mm/mmu_context_nohash.c
+++ b/arch/powerpc/mm/mmu_context_nohash.c
@@ -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;