]> git.baikalelectronics.ru Git - kernel.git/commit
perf, x86: Fix double disable calls
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Sat, 6 Mar 2010 12:20:40 +0000 (13:20 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 10 Mar 2010 12:22:33 +0000 (13:22 +0100)
commit784e603d63180bbdc0fa08aa0011ec9067eb70ac
tree727f1c39252fd99e7f58d9355b19d49578f5cad6
parent88a796ad5e4d3b0b3a30a5b5481b88c6498b9ed0
perf, x86: Fix double disable calls

hw_perf_enable() would disable events that were not yet enabled.

This causes problems with code that assumes that ->enable/->disable calls
are balanced (like the LBR code does).

What happens is that we disable newly added counters that match their
previous assignment, even though they are not yet programmed on the
hardware.

Avoid this by only doing the first pass over the existing events.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: paulus@samba.org
Cc: eranian@google.com
Cc: robert.richter@amd.com
Cc: fweisbec@gmail.com
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/perf_event.c