linux/drivers/s390
Gerald Schaefer 55a5542a54 s390/hibernate: fix error handling when suspend cpu != resume cpu
The resume code checks if the resume cpu is the same as the suspend cpu.
If not, and if it is also not possible to switch to the suspend cpu, an
error message should be printed and the resume process should be stopped
by loading a disabled wait psw.

The current logic is broken in multiple ways, the message is never printed,
and the disabled wait psw never loaded because the kernel panics before that:
- sam31 and SIGP_SET_ARCHITECTURE to ESA mode is wrong, this will break
  on the first 64bit instruction in sclp_early_printk().
- The init stack should be used, but the stack pointer is not set up correctly
  (missing aghi %r15,-STACK_FRAME_OVERHEAD).
- __sclp_early_printk() checks the sclp_init_state. If it is not
  sclp_init_state_uninitialized, it simply returns w/o printing anything.
  In the resumed kernel however, sclp_init_state will never be uninitialized.

This patch fixes those issues by removing the sam31/ESA logic, adding a
correct init stack pointer, and also introducing sclp_early_printk_force()
to allow using sclp_early_printk() even when sclp_init_state is not
uninitialized.

Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2018-09-20 13:20:23 +02:00
..
block libnvdimm-for-4.19_misc 2018-08-25 18:13:10 -07:00
char s390/hibernate: fix error handling when suspend cpu != resume cpu 2018-09-20 13:20:23 +02:00
cio s390 cio: Rewrite trace point class s390_class_schib 2018-07-23 13:49:56 +02:00
crypto s390/zcrypt: remove VLA usage from the AP bus 2018-09-12 11:33:37 +02:00
net s390/qeth: don't dump past end of unknown HW header 2018-09-12 13:12:51 -07:00
scsi s390/dasd,zfcp: fix gcc 8 stringop-truncation warnings 2018-07-02 11:24:52 +02:00
virtio virtio/s390: implement PM operations for virtio_ccw 2018-02-14 14:34:09 +02:00
Makefile kbuild: rename built-in.o to built-in.a 2018-03-26 02:01:19 +09:00