Message ID | 20210222085756.14396-7-frankja@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | s390x: Cleanup exception register save/restore and implement backtrace | expand |
On 22/02/2021 09.57, Janosch Frank wrote: > By moving the last user of SAVE/RESTORE_REGS to the macros that use > the stack we can finally remove these macros. > > Signed-off-by: Janosch Frank <frankja@linux.ibm.com> > Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> > Reviewed-by: Pierre Morel <pmorel@linux.ibm.com> > --- > s390x/cpu.S | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/s390x/cpu.S b/s390x/cpu.S > index 5267f029..e2ad56c8 100644 > --- a/s390x/cpu.S > +++ b/s390x/cpu.S > @@ -18,7 +18,7 @@ > */ > .globl diag308_load_reset > diag308_load_reset: > - SAVE_REGS > + SAVE_REGS_STACK > /* Backup current PSW mask, as we have to restore it on success */ > epsw %r0, %r1 > st %r0, GEN_LC_SW_INT_PSW > @@ -31,6 +31,7 @@ diag308_load_reset: > ogr %r0, %r1 > /* Store it at the reset PSW location (real 0x0) */ > stg %r0, 0 > + stg %r15, GEN_LC_SW_INT_GRS + 15 * 8 > /* Do the reset */ > diag %r0,%r2,0x308 > /* Failure path */ > @@ -40,7 +41,8 @@ diag308_load_reset: > /* load a cr0 that has the AFP control bit which enables all FPRs */ > 0: larl %r1, initial_cr0 > lctlg %c0, %c0, 0(%r1) > - RESTORE_REGS > + lg %r15, GEN_LC_SW_INT_GRS + 15 * 8 > + RESTORE_REGS_STACK > lhi %r2, 1 > larl %r0, 1f > stg %r0, GEN_LC_SW_INT_PSW + 8 > Reviewed-by: Thomas Huth <thuth@redhat.com>
diff --git a/s390x/cpu.S b/s390x/cpu.S index 5267f029..e2ad56c8 100644 --- a/s390x/cpu.S +++ b/s390x/cpu.S @@ -18,7 +18,7 @@ */ .globl diag308_load_reset diag308_load_reset: - SAVE_REGS + SAVE_REGS_STACK /* Backup current PSW mask, as we have to restore it on success */ epsw %r0, %r1 st %r0, GEN_LC_SW_INT_PSW @@ -31,6 +31,7 @@ diag308_load_reset: ogr %r0, %r1 /* Store it at the reset PSW location (real 0x0) */ stg %r0, 0 + stg %r15, GEN_LC_SW_INT_GRS + 15 * 8 /* Do the reset */ diag %r0,%r2,0x308 /* Failure path */ @@ -40,7 +41,8 @@ diag308_load_reset: /* load a cr0 that has the AFP control bit which enables all FPRs */ 0: larl %r1, initial_cr0 lctlg %c0, %c0, 0(%r1) - RESTORE_REGS + lg %r15, GEN_LC_SW_INT_GRS + 15 * 8 + RESTORE_REGS_STACK lhi %r2, 1 larl %r0, 1f stg %r0, GEN_LC_SW_INT_PSW + 8