]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/smp: enforce lowcore protection on CPU restart
authorAlexander Gordeev <agordeev@linux.ibm.com>
Wed, 20 Jul 2022 05:24:03 +0000 (07:24 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Thu, 28 Jul 2022 16:05:23 +0000 (18:05 +0200)
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 <hca@linux.ibm.com>
Fixes: 26ea42b4ff74 ("s390/smp: enable DAT before CPU restart callback is called")
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/kernel/setup.c

index 8d91eccc096325b47cf21f593da2826ccc420863..792ba69032d547ac25ed8c5b9d29179478d6afee 100644 (file)
@@ -508,8 +508,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++)