[PATCH v3 15/15] powerpc: make unrecoverable NMIs die instead of panic
Christophe Leroy
christophe.leroy at c-s.fr
Tue Apr 7 15:46:10 AEST 2020
Le 07/04/2020 à 07:16, Nicholas Piggin a écrit :
> System Reset and Machine Check interrupts that are not recoverable due
> to being nested or interrupting when RI=0 currently panic. This is
> not necessary, and can often just kill the current context and recover.
>
> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
Reviewed-by: Christophe Leroy <christophe.leroy at c-s.fr>
> ---
> arch/powerpc/kernel/traps.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
> index 1beae89bb871..afed3de33a9a 100644
> --- a/arch/powerpc/kernel/traps.c
> +++ b/arch/powerpc/kernel/traps.c
> @@ -513,11 +513,11 @@ void system_reset_exception(struct pt_regs *regs)
> #ifdef CONFIG_PPC_BOOK3S_64
> BUG_ON(get_paca()->in_nmi == 0);
> if (get_paca()->in_nmi > 1)
> - nmi_panic(regs, "Unrecoverable nested System Reset");
> + die("Unrecoverable nested System Reset", regs, SIGABRT);
> #endif
> /* Must die if the interrupt is not recoverable */
> if (!(regs->msr & MSR_RI))
> - nmi_panic(regs, "Unrecoverable System Reset");
> + die("Unrecoverable System Reset", regs, SIGABRT);
>
> if (saved_hsrrs) {
> mtspr(SPRN_HSRR0, hsrr0);
> @@ -858,7 +858,7 @@ void machine_check_exception(struct pt_regs *regs)
> bail:
> /* Must die if the interrupt is not recoverable */
> if (!(regs->msr & MSR_RI))
> - nmi_panic(regs, "Unrecoverable Machine check");
> + die("Unrecoverable Machine check", regs, SIGBUS);
> }
>
> void SMIException(struct pt_regs *regs)
>
More information about the Linuxppc-dev
mailing list