Commit 05b05f28 authored by Anton Blanchard's avatar Anton Blanchard Committed by Michael Ellerman

powerpc: Relocatable system call no longer uses the LR

We had some code to restore the LR in the relocatable system call path
back when we used the LR to do an indirect branch.

Commit 6a404806 ("powerpc: Avoid link stack corruption in MMU
on syscall entry path") changed this to use the CTR which is volatile
across system calls so does not need restoring.

Remove the stale comment and the restore of the LR.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 72e349f1
...@@ -59,14 +59,13 @@ END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE) \ ...@@ -59,14 +59,13 @@ END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE) \
#if defined(CONFIG_RELOCATABLE) #if defined(CONFIG_RELOCATABLE)
/* /*
* We can't branch directly; in the direct case we use LR * We can't branch directly so we do it via the CTR which
* and system_call_entry restores LR. (We thus need to move * is volatile across system calls.
* LR to r10 in the RFID case too.)
*/ */
#define SYSCALL_PSERIES_2_DIRECT \ #define SYSCALL_PSERIES_2_DIRECT \
mflr r10 ; \ mflr r10 ; \
ld r12,PACAKBASE(r13) ; \ ld r12,PACAKBASE(r13) ; \
LOAD_HANDLER(r12, system_call_entry_direct) ; \ LOAD_HANDLER(r12, system_call_entry) ; \
mtctr r12 ; \ mtctr r12 ; \
mfspr r12,SPRN_SRR1 ; \ mfspr r12,SPRN_SRR1 ; \
/* Re-use of r13... No spare regs to do this */ \ /* Re-use of r13... No spare regs to do this */ \
...@@ -80,7 +79,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE) \ ...@@ -80,7 +79,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE) \
mfspr r12,SPRN_SRR1 ; \ mfspr r12,SPRN_SRR1 ; \
li r10,MSR_RI ; \ li r10,MSR_RI ; \
mtmsrd r10,1 ; /* Set RI (EE=0) */ \ mtmsrd r10,1 ; /* Set RI (EE=0) */ \
b system_call_entry_direct ; b system_call_entry ;
#endif #endif
/* /*
...@@ -969,13 +968,6 @@ hv_facility_unavailable_relon_trampoline: ...@@ -969,13 +968,6 @@ hv_facility_unavailable_relon_trampoline:
__end_interrupts: __end_interrupts:
.align 7 .align 7
system_call_entry_direct:
#if defined(CONFIG_RELOCATABLE)
/* The first level prologue may have used LR to get here, saving
* orig in r10. To save hacking/ifdeffing common code, restore here.
*/
mtlr r10
#endif
system_call_entry: system_call_entry:
b system_call_common b system_call_common
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment