Skip to content

Commit 86a8680

Browse files
author
Martin Schwidefsky
committed
s390/setup: fix boot crash for machine without EDAT-1
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>
1 parent 8727638 commit 86a8680

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
@@ -451,13 +451,12 @@ static void __init setup_lowcore_dat_off(void)
451451

452452
static void __init setup_lowcore_dat_on(void)
453453
{
454-
struct lowcore *lc;
455-
456-
lc = lowcore_ptr[0];
457-
lc->external_new_psw.mask |= PSW_MASK_DAT;
458-
lc->svc_new_psw.mask |= PSW_MASK_DAT;
459-
lc->program_new_psw.mask |= PSW_MASK_DAT;
460-
lc->io_new_psw.mask |= PSW_MASK_DAT;
454+
__ctl_clear_bit(0, 28);
455+
S390_lowcore.external_new_psw.mask |= PSW_MASK_DAT;
456+
S390_lowcore.svc_new_psw.mask |= PSW_MASK_DAT;
457+
S390_lowcore.program_new_psw.mask |= PSW_MASK_DAT;
458+
S390_lowcore.io_new_psw.mask |= PSW_MASK_DAT;
459+
__ctl_set_bit(0, 28);
461460
}
462461

463462
static struct resource code_resource = {

0 commit comments

Comments
 (0)