diff options
author | Michael Holzheu <holzheu@linux.vnet.ibm.com> | 2011-08-03 10:44:19 -0400 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2011-08-03 10:44:19 -0400 |
commit | 7dd6b3343fdc190712d1620ee8848d25c4c77c33 (patch) | |
tree | e4c3258880f88096f9ecf65fa2cca20e62b5813d /arch/s390/kernel/entry64.S | |
parent | 944291de33b26a8b403f13f5eb0cc51fb982aa1e (diff) |
[S390] Add PSW restart shutdown trigger
With this patch a new S390 shutdown trigger "restart" is added. If under
z/VM "systerm restart" is entered or under the HMC the "PSW restart" button
is pressed, the PSW located at 0 (31 bit) or 0x1a0 (64 bit) bit is loaded.
Now we execute do_restart() that processes the restart action that is
defined under /sys/firmware/shutdown_actions/on_restart. Currently the
following actions are possible: reipl (default), stop, vmcmd, dump, and
dump_reipl.
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/entry64.S')
-rw-r--r-- | arch/s390/kernel/entry64.S | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 7a0fd426ca92..5f729d627cef 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -865,6 +865,26 @@ restart_crash: | |||
865 | restart_go: | 865 | restart_go: |
866 | #endif | 866 | #endif |
867 | 867 | ||
868 | # | ||
869 | # PSW restart interrupt handler | ||
870 | # | ||
871 | ENTRY(psw_restart_int_handler) | ||
872 | stg %r15,__LC_SAVE_AREA_64(%r0) # save r15 | ||
873 | larl %r15,restart_stack # load restart stack | ||
874 | lg %r15,0(%r15) | ||
875 | aghi %r15,-SP_SIZE # make room for pt_regs | ||
876 | stmg %r0,%r14,SP_R0(%r15) # store gprs %r0-%r14 to stack | ||
877 | mvc SP_R15(8,%r15),__LC_SAVE_AREA_64(%r0)# store saved %r15 to stack | ||
878 | mvc SP_PSW(16,%r15),__LC_RST_OLD_PSW(%r0)# store restart old psw | ||
879 | xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15) # set backchain to 0 | ||
880 | brasl %r14,do_restart | ||
881 | |||
882 | larl %r14,restart_psw_crash # load disabled wait PSW if | ||
883 | lpswe 0(%r14) # do_restart returns | ||
884 | .align 8 | ||
885 | restart_psw_crash: | ||
886 | .quad 0x0002000080000000,0x0000000000000000 + restart_psw_crash | ||
887 | |||
868 | .section .kprobes.text, "ax" | 888 | .section .kprobes.text, "ax" |
869 | 889 | ||
870 | #ifdef CONFIG_CHECK_STACK | 890 | #ifdef CONFIG_CHECK_STACK |