diff options
author | Michael Holzheu <holzheu@linux.vnet.ibm.com> | 2011-08-03 16:44:19 +0200 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2011-08-03 16:44:19 +0200 |
commit | 7dd6b3343fdc190712d1620ee8848d25c4c77c33 (patch) | |
tree | e4c3258880f88096f9ecf65fa2cca20e62b5813d /arch/s390/kernel/smp.c | |
parent | 944291de33b26a8b403f13f5eb0cc51fb982aa1e (diff) | |
download | op-kernel-dev-7dd6b3343fdc190712d1620ee8848d25c4c77c33.zip op-kernel-dev-7dd6b3343fdc190712d1620ee8848d25c4c77c33.tar.gz |
[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/smp.c')
-rw-r--r-- | arch/s390/kernel/smp.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index a6d85c0..70f4b96 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -468,6 +468,11 @@ int __cpuinit start_secondary(void *cpuvoid) ipi_call_lock(); set_cpu_online(smp_processor_id(), true); ipi_call_unlock(); + __ctl_clear_bit(0, 28); /* Disable lowcore protection */ + S390_lowcore.restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY; + S390_lowcore.restart_psw.addr = + PSW_ADDR_AMODE | (unsigned long) psw_restart_int_handler; + __ctl_set_bit(0, 28); /* Enable lowcore protection */ /* Switch on interrupts */ local_irq_enable(); /* cpu_idle will call schedule for us */ @@ -507,7 +512,11 @@ static int __cpuinit smp_alloc_lowcore(int cpu) memset((char *)lowcore + 512, 0, sizeof(*lowcore) - 512); lowcore->async_stack = async_stack + ASYNC_SIZE; lowcore->panic_stack = panic_stack + PAGE_SIZE; - + lowcore->restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY; + lowcore->restart_psw.addr = + PSW_ADDR_AMODE | (unsigned long) restart_int_handler; + if (user_mode != HOME_SPACE_MODE) + lowcore->restart_psw.mask |= PSW_ASC_HOME; #ifndef CONFIG_64BIT if (MACHINE_HAS_IEEE) { unsigned long save_area; |