Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f886f0f6 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman
Browse files

powerpc/64s: Fix mce accounting for powernv



On 64-bit Book3s, when we're in HV mode, we have already counted the
machine check exception in machine_check_early().

Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
[mpe: Use IS_ENABLED() rather than an #ifdef]
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 1a367063
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -755,6 +755,8 @@ void machine_check_exception(struct pt_regs *regs)
	enum ctx_state prev_state = exception_enter();
	int recover = 0;

	/* 64s accounts the mce in machine_check_early when in HVMODE */
	if (!IS_ENABLED(CONFIG_PPC_BOOK3S_64) || !cpu_has_feature(CPU_FTR_HVMODE))
		__this_cpu_inc(irq_stat.mce_exceptions);

	add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE);