Skip to content

Commit

Permalink
powerpc/64s: consolidate MCE counter increment.
Browse files Browse the repository at this point in the history
The code in machine_check_exception excludes 64s hvmode when
incrementing the MCE counter only to call opal_machine_check to
increment it specifically for this case.

Remove the exclusion and special case.

Fixes: a43c159 ("powerpc/pseries: Flush SLB contents on SLB MCE
		errors.")

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Michal Suchanek authored and Michael Ellerman committed Oct 3, 2018
1 parent 5130311 commit 8a03e81
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions arch/powerpc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,9 +741,7 @@ void machine_check_exception(struct pt_regs *regs)
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))
__this_cpu_inc(irq_stat.mce_exceptions);
__this_cpu_inc(irq_stat.mce_exceptions);

add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE);

Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/platforms/powernv/opal.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,6 @@ int opal_machine_check(struct pt_regs *regs)
{
struct machine_check_event evt;

__this_cpu_inc(irq_stat.mce_exceptions);

if (!get_mce_event(&evt, MCE_EVENT_RELEASE))
return 0;

Expand Down

0 comments on commit 8a03e81

Please sign in to comment.