metag: perf: don't reset TXTACTCYC
authorJames Hogan <james.hogan@imgtec.com>
Wed, 27 Feb 2013 21:54:51 +0000 (21:54 +0000)
committerJames Hogan <james.hogan@imgtec.com>
Fri, 15 Mar 2013 13:20:15 +0000 (13:20 +0000)
commit1fb4dc5c39af941d3abc597337e0ea776bfce0f2
tree3a5a08501b8f421de3d69263c0bad38bd95221d1
parent9344de1b1c64b2217f3b15508266deff2a8d6c84
metag: perf: don't reset TXTACTCYC

The thread active cycle counter TXTACTCYC is used in __delay so it
shouldn't really be reset to zero by perf. Fix perf to just read the
value, and instead of clearing it, record the prev_count value in
enable_counter so that the delta calculations know about the previous
value.

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