s390 updates for 6.0-rc5

- Fix absolute zero lowcore corruption on kdump when CPU0 is offline.
 
 - Fix lowcore protection setup for offline CPU restart.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEE3QHqV+H2a8xAv27vjYWKoQLXFBgFAmMca+IACgkQjYWKoQLX
 FBjE4Af+N/s30gWrJT1qY5ACxNyVH+UUbND+J/1Avg/PHMS1fLY/YN48clsPDimD
 WqnmYWqMCSxRIg29qY6Inj+7ZMI8lrRwVO46JU+4a9kujKzppjsWxVrotaIYS+5n
 EdBHPqdchxAhymAD9BkbffeuelFe/LKRY6R/JywbXMPbzNtx/KTO6wHNmPj3ekqK
 04jPtgcVl0bziwvAVGhCxPqrHPUKxkW0EliyDWPvSYdTuroR6m8qKzKzaG2EpXwk
 7eOJqIoZ88UVZYHPux+JSlaFMQzZS4a3kMHXzpc0X5DnHmyfYx0why2LFQKWX4fG
 mZ59CIaZOV084t8zm98TiPs78sdHsg==
 =JuWY
 -----END PGP SIGNATURE-----

Merge tag 's390-6.0-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Vasily Gorbik:

 - Fix absolute zero lowcore corruption on kdump when CPU0 is offline

 - Fix lowcore protection setup for offline CPU restart

* tag 's390-6.0-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/smp: enforce lowcore protection on CPU restart
  s390/boot: fix absolute zero lowcore corruption on boot
This commit is contained in:
Linus Torvalds 2022-09-10 13:19:31 -04:00
commit b96fbd602d
2 changed files with 3 additions and 2 deletions

View File

@ -64,7 +64,7 @@ static inline unsigned long nmi_get_mcesa_size(void)
* structure. The structure is required for machine check happening * structure. The structure is required for machine check happening
* early in the boot process. * early in the boot process.
*/ */
static struct mcesa boot_mcesa __initdata __aligned(MCESA_MAX_SIZE); static struct mcesa boot_mcesa __aligned(MCESA_MAX_SIZE);
void __init nmi_alloc_mcesa_early(u64 *mcesad) void __init nmi_alloc_mcesa_early(u64 *mcesad)
{ {

View File

@ -479,6 +479,7 @@ static void __init setup_lowcore_dat_off(void)
put_abs_lowcore(restart_data, lc->restart_data); put_abs_lowcore(restart_data, lc->restart_data);
put_abs_lowcore(restart_source, lc->restart_source); put_abs_lowcore(restart_source, lc->restart_source);
put_abs_lowcore(restart_psw, lc->restart_psw); put_abs_lowcore(restart_psw, lc->restart_psw);
put_abs_lowcore(mcesad, lc->mcesad);
mcck_stack = (unsigned long)memblock_alloc(THREAD_SIZE, THREAD_SIZE); mcck_stack = (unsigned long)memblock_alloc(THREAD_SIZE, THREAD_SIZE);
if (!mcck_stack) if (!mcck_stack)
@ -507,8 +508,8 @@ static void __init setup_lowcore_dat_on(void)
S390_lowcore.svc_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.program_new_psw.mask |= PSW_MASK_DAT;
S390_lowcore.io_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_set_bit(0, 28);
__ctl_store(S390_lowcore.cregs_save_area, 0, 15);
put_abs_lowcore(restart_flags, RESTART_FLAG_CTLREGS); put_abs_lowcore(restart_flags, RESTART_FLAG_CTLREGS);
put_abs_lowcore(program_new_psw, lc->program_new_psw); put_abs_lowcore(program_new_psw, lc->program_new_psw);
for (cr = 0; cr < ARRAY_SIZE(lc->cregs_save_area); cr++) for (cr = 0; cr < ARRAY_SIZE(lc->cregs_save_area); cr++)