File tree Expand file tree Collapse file tree 4 files changed +6
-17
lines changed
Expand file tree Collapse file tree 4 files changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ static inline void __hard_EE_RI_disable(void)
9090 if (IS_ENABLED (CONFIG_BOOKE ))
9191 wrtee (0 );
9292 else if (IS_ENABLED (CONFIG_PPC_8xx ))
93- wrtspr (SPRN_NRI );
93+ wrtspr_sync (SPRN_NRI );
9494 else if (IS_ENABLED (CONFIG_PPC_BOOK3S_64 ))
9595 __mtmsrd (0 , 1 );
9696 else
Original file line number Diff line number Diff line change @@ -1400,6 +1400,7 @@ static inline void mtmsr_isync(unsigned long val)
14001400 : "r" ((unsigned long)(v)) \
14011401 : "memory")
14021402#define wrtspr (rn ) asm volatile("mtspr " __stringify(rn) ",2" : : : "memory")
1403+ #define wrtspr_sync (rn ) asm volatile("mtspr " __stringify(rn) ",2; sync" : : : "memory")
14031404
14041405static inline void wrtee (unsigned long val )
14051406{
Original file line number Diff line number Diff line change @@ -101,17 +101,6 @@ SYM_FUNC_END(__kuep_unlock)
101101.endm
102102#endif
103103
104- .macro clr_ri trash
105- #ifndef CONFIG_BOOKE
106- #ifdef CONFIG_PPC_8xx
107- mtspr SPRN_NRI, \trash
108- #else
109- li \trash, MSR_KERNEL & ~MSR_RI
110- mtmsr \trash
111- #endif
112- #endif
113- .endm
114-
115104 .globl transfer_to_syscall
116105transfer_to_syscall:
117106 stw r3, ORIG_GPR3(r1)
@@ -160,7 +149,6 @@ ret_from_syscall:
160149 cmpwi r3,0
161150 REST_GPR(3 , r1)
162151syscall_exit_finish:
163- clr_ri r4
164152 mtspr SPRN_SRR0,r7
165153 mtspr SPRN_SRR1,r8
166154
@@ -237,7 +225,6 @@ fast_exception_return:
237225 /* Clear the exception marker on the stack to avoid confusing stacktrace */
238226 li r10, 0
239227 stw r10, 8 (r11)
240- clr_ri r10
241228 mtspr SPRN_SRR1,r9
242229 mtspr SPRN_SRR0,r12
243230 REST_GPR(9 , r11)
@@ -270,7 +257,6 @@ interrupt_return:
270257.Lfast_user_interrupt_return:
271258 lwz r11,_NIP(r1)
272259 lwz r12,_MSR(r1)
273- clr_ri r4
274260 mtspr SPRN_SRR0,r11
275261 mtspr SPRN_SRR1,r12
276262
@@ -313,7 +299,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRED_STWCX)
313299 cmpwi cr1,r3,0
314300 lwz r11,_NIP(r1)
315301 lwz r12,_MSR(r1)
316- clr_ri r4
317302 mtspr SPRN_SRR0,r11
318303 mtspr SPRN_SRR1,r12
319304
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ static inline bool exit_must_hard_disable(void)
3838#else
3939static inline bool exit_must_hard_disable (void )
4040{
41- return false ;
41+ return true ;
4242}
4343#endif
4444
@@ -443,6 +443,9 @@ notrace unsigned long interrupt_exit_kernel_prepare(struct pt_regs *regs)
443443
444444 if (unlikely (stack_store ))
445445 __hard_EE_RI_disable ();
446+ #else
447+ } else {
448+ __hard_EE_RI_disable ();
446449#endif /* CONFIG_PPC64 */
447450 }
448451
You can’t perform that action at this time.
0 commit comments