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

Commit 8d330919 authored by Lin Ming's avatar Lin Ming Committed by Ingo Molnar
Browse files

perf, x86, Pentium4: Clear the P4_CCCR_FORCE_OVF flag



If on Pentium4 CPUs the FORCE_OVF flag is set then an NMI happens
on every event, which can generate a flood of NMIs. Clear it.

Reported-by: default avatarVince Weaver <vweaver1@eecs.utk.edu>
Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: <stable@kernel.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 151772db
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -497,6 +497,8 @@ static int p4_hw_config(struct perf_event *event)
		event->hw.config |= event->attr.config &
		event->hw.config |= event->attr.config &
			(p4_config_pack_escr(P4_ESCR_MASK_HT) |
			(p4_config_pack_escr(P4_ESCR_MASK_HT) |
			 p4_config_pack_cccr(P4_CCCR_MASK_HT | P4_CCCR_RESERVED));
			 p4_config_pack_cccr(P4_CCCR_MASK_HT | P4_CCCR_RESERVED));

		event->hw.config &= ~P4_CCCR_FORCE_OVF;
	}
	}


	rc = x86_setup_perfctr(event);
	rc = x86_setup_perfctr(event);