powerpc: introduce die_mce

As explained by commit daf00ae71d ("powerpc/traps: restore
recoverability of machine_check interrupts"), die() can't be called from
within nmi_enter to nicely kill a process context that was interrupted.
nmi_exit must be called first.

This adds a function die_mce which takes care of this for machine check
handlers.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210130130852.2952424-24-npiggin@gmail.com
This commit is contained in:
Nicholas Piggin 2021-01-30 23:08:33 +10:00 • committed by Michael Ellerman
commit 209e9d500e
4 changed files with 18 additions and 8 deletions