Skip to content

Commit 7a04d49

Browse files
Alexander GordeevVasily Gorbik
authored andcommitted
s390/kexec: turn DAT mode off immediately before purgatory
The kernel code is not guaranteed DAT-off mode safe. Turn the DAT mode off immediately before entering the purgatory. Further, to avoid subtle side effects reset the system immediately before turning DAT mode off while making all necessary preparations in advance. Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
1 parent 1a33aee commit 7a04d49

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

arch/s390/kernel/machine_kexec.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,13 @@ static void __do_machine_kexec(void *data)
254254
relocate_kernel_t data_mover;
255255
struct kimage *image = data;
256256

257-
s390_reset_system();
258257
data_mover = (relocate_kernel_t) page_to_phys(image->control_code_page);
259-
260-
__arch_local_irq_stnsm(0xfb); /* disable DAT - avoid no-execute */
261-
/* Call the moving routine */
262258
diag308_subcode = DIAG308_CLEAR_RESET;
263259
if (sclp.has_iplcc)
264260
diag308_subcode |= DIAG308_FLAG_EI;
261+
s390_reset_system();
262+
263+
__arch_local_irq_stnsm(0xfb); /* disable DAT - avoid no-execute */
265264
(*data_mover)(&image->head, image->start, diag308_subcode);
266265

267266
/* Die if kexec returns */

0 commit comments

Comments
 (0)