From: Alexander Gordeev Date: Wed, 20 Jul 2022 05:24:03 +0000 (+0200) Subject: s390/smp: enforce lowcore protection on CPU restart X-Git-Tag: baikal/mips/sdk5.9~137 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=8258a162f85338cb7927e5b5183b40589c230c05;p=kernel.git s390/smp: enforce lowcore protection on CPU restart [ Upstream commit e3640cb262f0b13be4ad1610c51ef4d84f636c5f ] As result of commit 26ea42b4ff74 ("s390/smp: enable DAT before CPU restart callback is called") the low-address protection bit gets mistakenly unset in control register 0 save area of the absolute zero memory. That area is used when manual PSW restart happened to hit an offline CPU. In this case the low-address protection for that CPU will be dropped. Reviewed-by: Heiko Carstens Fixes: 26ea42b4ff74 ("s390/smp: enable DAT before CPU restart callback is called") Signed-off-by: Alexander Gordeev Signed-off-by: Sasha Levin --- diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 6b1a8697fae8d..c8e7b3db82e28 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c @@ -507,8 +507,8 @@ static void __init setup_lowcore_dat_on(void) 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_store(S390_lowcore.cregs_save_area, 0, 15); __ctl_set_bit(0, 28); + __ctl_store(S390_lowcore.cregs_save_area, 0, 15); put_abs_lowcore(restart_flags, RESTART_FLAG_CTLREGS); put_abs_lowcore(program_new_psw, lc->program_new_psw); for (cr = 0; cr < ARRAY_SIZE(lc->cregs_save_area); cr++)