In case of an error we'll currently return with the wrong values in gr0 and gr1. Let's fix that by restoring the registers before setting the return value and branching to the return address. Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx> --- s390x/cpu.S | 1 + 1 file changed, 1 insertion(+) diff --git a/s390x/cpu.S b/s390x/cpu.S index 82b5e25d..0bd8c0e3 100644 --- a/s390x/cpu.S +++ b/s390x/cpu.S @@ -34,6 +34,7 @@ diag308_load_reset: stg %r15, GEN_LC_SW_INT_GRS + 15 * 8 /* Do the reset */ diag %r0,%r2,0x308 + RESTORE_REGS_STACK /* Failure path */ xgr %r2, %r2 br %r14 -- 2.32.0