s390/smp,mcck: fix early IPI handling
authorHeiko Carstens <hca@linux.ibm.com>
Tue, 5 Sep 2023 13:49:37 +0000 (15:49 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 19 Sep 2023 11:26:55 +0000 (13:26 +0200)
commit4a1725281fc5b0009944b1c0e1d2c1dc311a09ec
treeea4f7301c1fcb383e056ef56b3155cd1a0d61870
parentf3cfb875d0fd5f4af40cbb992f436ad396f69a71
s390/smp,mcck: fix early IPI handling

Both the external call as well as the emergency signal submask bits in
control register 0 are set before any interrupt handler is registered.

Change the order and first register the interrupt handler and only then
enable the interrupts by setting the corresponding bits in control
register 0.

This prevents that the second part of the machine check handler for
early machine check handling is not executed: the machine check handler
sends an IPI to the CPU it runs on. If the corresponding interrupts are
enabled, but no interrupt handler is present, the interrupt is ignored.

Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/early.c
arch/s390/kernel/smp.c