powerpc/kernel: Open code SET_DEFAULT_THREAD_PPR
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 25 Nov 2015 03:25:18 +0000 (14:25 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 17 Dec 2015 11:40:57 +0000 (22:40 +1100)
This is only used in one location, open code it.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/ppc_asm.h
arch/powerpc/kernel/entry_64.S

index 67f05d4..499d9f8 100644 (file)
@@ -413,19 +413,6 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601)
        FTR_SECTION_ELSE_NESTED(848);   \
        mtocrf (FXM), RS;               \
        ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_NOEXECUTE, 848)
-
-/*
- * PPR restore macros used in entry_64.S
- * Used for P7 or later processors
- */
-#define SET_DEFAULT_THREAD_PPR(ra, rb)                                 \
-BEGIN_FTR_SECTION_NESTED(945)                                          \
-       lis     ra,INIT_PPR@highest;    /* default ppr=3 */             \
-       ld      rb,PACACURRENT(r13);                                    \
-       sldi    ra,ra,32;       /* 11- 13 bits are used for ppr */      \
-       std     ra,TASKTHREADPPR(rb);                                   \
-END_FTR_SECTION_NESTED(CPU_FTR_HAS_PPR,CPU_FTR_HAS_PPR,945)
-
 #endif
 
 /*
index 651a655..0d525ce 100644 (file)
@@ -316,7 +316,13 @@ syscall_exit_work:
        subi    r12,r12,TI_FLAGS
 
 4:     /* Anything else left to do? */
-       SET_DEFAULT_THREAD_PPR(r3, r10)         /* Set thread.ppr = 3 */
+BEGIN_FTR_SECTION
+       lis     r3,INIT_PPR@highest     /* Set thread.ppr = 3 */
+       ld      r10,PACACURRENT(r13)
+       sldi    r3,r3,32        /* bits 11-13 are used for ppr */
+       std     r3,TASKTHREADPPR(r10)
+END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
+
        andi.   r0,r9,(_TIF_SYSCALL_DOTRACE|_TIF_SINGLESTEP)
        beq     ret_from_except_lite