From: Peter Zijlstra Date: Mon, 15 Jun 2009 17:00:20 +0000 (+0200) Subject: perf_counter: x86: Set the period in the intel overflow handler X-Git-Tag: upstream/snapshot3+hdmi~18371^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=60f916dee612130c9977a8edd4abee98334202ba;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git perf_counter: x86: Set the period in the intel overflow handler Commit 9e350de37ac960 ("perf_counter: Accurate period data") missed a spot, which caused all Intel-PMU samples to have a period of 0. This broke auto-freq sampling. Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c index e8c68a5..ce1ae3f 100644 --- a/arch/x86/kernel/cpu/perf_counter.c +++ b/arch/x86/kernel/cpu/perf_counter.c @@ -1224,6 +1224,8 @@ again: if (!intel_pmu_save_and_restart(counter)) continue; + data.period = counter->hw.last_period; + if (perf_counter_overflow(counter, 1, &data)) intel_pmu_disable_counter(&counter->hw, bit); }