metag: perf: fixes for interrupting perf counters
authorJames Hogan <james.hogan@imgtec.com>
Wed, 27 Feb 2013 16:16:38 +0000 (16:16 +0000)
committerJames Hogan <james.hogan@imgtec.com>
Fri, 15 Mar 2013 13:20:00 +0000 (13:20 +0000)
commitdb59932f62386cdfd8510c27a83118c5e915e9ea
treef644aaf9845d16b7da415beb3b1a41b8744eed1c
parentc43ca04b5e7854b3996f84a495e4553941e76266
metag: perf: fixes for interrupting perf counters

The overflow handler needs to read modify write when re-enabling the
counter so as not to change the counter value as it may have been
changed to ready the next interrupt on overflow. Similarly for
interrupting counters metag_pmu_enable_counter needs to leave the
counter value unchanged rather than resetting it to zero.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
arch/metag/kernel/perf/perf_event.c