summaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2019-02-18 18:10:08 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-23 20:10:13 +0100
commit3053cb9701cdb12919fc7ad815aa022182cb8f07 (patch)
tree9e8555cd1c95e817a6ffef6c9017d2b3b48c7241 /arch/s390
parente578f90d8a9cb6d4ae2e6cadc8aaab6e9a2aa656 (diff)
downloadlinux-stable-3053cb9701cdb12919fc7ad815aa022182cb8f07.tar.gz
linux-stable-3053cb9701cdb12919fc7ad815aa022182cb8f07.tar.bz2
linux-stable-3053cb9701cdb12919fc7ad815aa022182cb8f07.zip
s390/setup: fix boot crash for machine without EDAT-1
commit 86a86804e4f18fc3880541b3d5a07f4df0fe29cb 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>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/setup.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index b41cd804d921..5f85e0dfa66d 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -387,13 +387,12 @@ static void __init setup_lowcore_dat_off(void)
static void __init setup_lowcore_dat_on(void)
{
- struct lowcore *lc;
-
- lc = lowcore_ptr[0];
- lc->external_new_psw.mask |= PSW_MASK_DAT;
- lc->svc_new_psw.mask |= PSW_MASK_DAT;
- lc->program_new_psw.mask |= PSW_MASK_DAT;
- lc->io_new_psw.mask |= PSW_MASK_DAT;
+ __ctl_clear_bit(0, 28);
+ S390_lowcore.external_new_psw.mask |= PSW_MASK_DAT;
+ S390_lowcore.svc_new_psw.mask |= PSW_MASK_DAT;
+ S390_lowcore.program_new_psw.mask |= PSW_MASK_DAT;
+ S390_lowcore.io_new_psw.mask |= PSW_MASK_DAT;
+ __ctl_set_bit(0, 28);
}
static struct resource code_resource = {