Skip to content

Commit 3053cb9

Browse files
Martin Schwidefskygregkh
authored andcommitted
s390/setup: fix boot crash for machine without EDAT-1
commit 86a8680 upstream. The fix to make WARN work in the early boot code created a problem on older machines without EDAT-1. The setup_lowcore_dat_on function uses the pointer from lowcore_ptr[0] to set the DAT bit in the new PSWs. That does not work if the kernel page table is set up with 4K pages as the prefix address maps to absolute zero. To make this work the PSWs need to be changed with via address 0 in form of the S390_lowcore definition. Reported-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Cornelia Huck <cohuck@redhat.com> Fixes: 94f85ed3e2f8 ("s390/setup: fix early warning messages") Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e578f90 commit 3053cb9

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

‎arch/s390/kernel/setup.c‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -387,13 +387,12 @@ static void __init setup_lowcore_dat_off(void)
387387

388388
static void __init setup_lowcore_dat_on(void)
389389
{
390-
struct lowcore *lc;
391-
392-
lc = lowcore_ptr[0];
393-
lc->external_new_psw.mask |= PSW_MASK_DAT;
394-
lc->svc_new_psw.mask |= PSW_MASK_DAT;
395-
lc->program_new_psw.mask |= PSW_MASK_DAT;
396-
lc->io_new_psw.mask |= PSW_MASK_DAT;
390+
__ctl_clear_bit(0, 28);
391+
S390_lowcore.external_new_psw.mask |= PSW_MASK_DAT;
392+
S390_lowcore.svc_new_psw.mask |= PSW_MASK_DAT;
393+
S390_lowcore.program_new_psw.mask |= PSW_MASK_DAT;
394+
S390_lowcore.io_new_psw.mask |= PSW_MASK_DAT;
395+
__ctl_set_bit(0, 28);
397396
}
398397

399398
static struct resource code_resource = {

0 commit comments

Comments
 (0)