powerpc/mce: Avoid using irq_work_queue() in realmode
authorGanesh Goudar <ganeshgr@linux.ibm.com>
Thu, 20 Jan 2022 12:19:31 +0000 (17:49 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 7 Mar 2022 13:05:00 +0000 (00:05 +1100)
commitcc15ff3275694fedc33cd3d53212a43eec7aa0bc
treedc15adec5a7491d5c1d6405e63169188942d45a8
parent0a182611d149b5b747014fbb230ec35b20a45c86
powerpc/mce: Avoid using irq_work_queue() in realmode

In realmode mce handler we use irq_work_queue() to defer
the processing of mce events, irq_work_queue() can only
be called when translation is enabled because it touches
memory outside RMA, hence we enable translation before
calling irq_work_queue and disable on return, though it
is not safe to do in realmode.

To avoid this, program the decrementer and call the event
processing functions from timer handler.

Signed-off-by: Ganesh Goudar <ganeshgr@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220120121931.517974-1-ganeshgr@linux.ibm.com
arch/powerpc/include/asm/machdep.h
arch/powerpc/include/asm/mce.h
arch/powerpc/include/asm/paca.h
arch/powerpc/kernel/mce.c
arch/powerpc/kernel/time.c
arch/powerpc/platforms/pseries/pseries.h
arch/powerpc/platforms/pseries/ras.c
arch/powerpc/platforms/pseries/setup.c