s390/nmi: use smp_emergency_stop instead of smp_send_stop
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 15 Sep 2017 14:24:31 +0000 (16:24 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 19 Oct 2017 15:07:32 +0000 (17:07 +0200)
commit00a8f886dbdaeea1d93543d5311ddf3a2680bf2b
treeff90be560ccfb78b9bd1a165dd552c0ee5263dda
parent608796ffe13855bb066bebbd58d8b86a49cb5c27
s390/nmi: use smp_emergency_stop instead of smp_send_stop

The smp_send_stop() function can be called from s390_handle_damage
while DAT is off. This happens if a machine check indicates that
kernel gprs or control registers can not be restored. The function
smp_send_stop reenables DAT via __load_psw_mask. That should work
for the case of lost kernel gprs and the system will do the expected
stop of all CPUs. But if control registers are lost, in particular
CR13 with the home space ASCE, interesting secondary crashes may
occur.

Make smp_emergency_stop callable from nmi.c and remove the cpumask
argument. Replace the smp_send_stop call with smp_emergency_stop in
the s390_handle_damage function.

In addition add notrace and NOKPROBE_SYMBOL annotations for all
functions required for the emergency shutdown.

Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/smp.h
arch/s390/kernel/nmi.c
arch/s390/kernel/smp.c