From: James Hogan Date: Wed, 27 Feb 2013 16:16:38 +0000 (+0000) Subject: metag: perf: add missing prev_count updates X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~101^2~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6ac1e6edacc7e1fb0405d61f95a797c6a712411;p=pandora-kernel.git metag: perf: add missing prev_count updates The prev_count needs setting when changing the counter value, otherwise the calculated delta will be wrong, which for frequency sampling (dynamic period sampling) results in sampling at too high a frequency. For non-interrupting performance counters it should also be cleared when enabling the counter since the write to the PERF_COUNT register will clear the perf counter. This also includes a minor change to remove the u64 cast from the metag_pmu->write() call as metag_pmu->write() takes a u32 anyway, and in any case GCC is smart enough to optimise away the cast. Signed-off-by: James Hogan Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed