Skip to content

Commit

Permalink
powerpc: Machine check interrupt is a non-maskable interrupt
Browse files Browse the repository at this point in the history
Use nmi_enter similarly to system reset interrupts. This uses NMI
printk NMI buffers and turns off various debugging facilities that
helps avoid tripping on ourselves or other CPUs.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Nicholas Piggin authored and Michael Ellerman committed Aug 31, 2017
1 parent 6fcd6ba commit b96672d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions arch/powerpc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,10 @@ int machine_check_generic(struct pt_regs *regs)

void machine_check_exception(struct pt_regs *regs)
{
enum ctx_state prev_state = exception_enter();
int recover = 0;
bool nested = in_nmi();
if (!nested)
nmi_enter();

/* 64s accounts the mce in machine_check_early when in HVMODE */
if (!IS_ENABLED(CONFIG_PPC_BOOK3S_64) || !cpu_has_feature(CPU_FTR_HVMODE))
Expand Down Expand Up @@ -677,10 +679,11 @@ void machine_check_exception(struct pt_regs *regs)

/* Must die if the interrupt is not recoverable */
if (!(regs->msr & MSR_RI))
panic("Unrecoverable Machine check");
nmi_panic(regs, "Unrecoverable Machine check");

bail:
exception_exit(prev_state);
if (!nested)
nmi_exit();
}

void SMIException(struct pt_regs *regs)
Expand Down

0 comments on commit b96672d

Please sign in to comment.