> > Does perf_event_fsl_emb.c need this as well (it has almost the same > > record_and_restart code)? > > I would think so.
Good point: When fixing the frequency calculations for perf on powerpc I forgot to fix the FSL version. If we dont set event->hw.last_period the frequency to period calculations in perf go haywire and we continually throttle/unthrottle the PMU. Signed-off-by: Anton Blanchard <an...@samba.org> --- This is only compile tested. Index: powerpc.git/arch/powerpc/kernel/perf_event_fsl_emb.c =================================================================== --- powerpc.git.orig/arch/powerpc/kernel/perf_event_fsl_emb.c 2011-01-18 21:23:57.761644115 +1100 +++ powerpc.git/arch/powerpc/kernel/perf_event_fsl_emb.c 2011-01-18 21:25:28.994477247 +1100 @@ -596,6 +596,7 @@ static void record_and_restart(struct pe if (left <= 0) left = period; record = 1; + event->hw.last_period = event->hw.sample_period; } if (left < 0x80000000LL) val = 0x80000000LL - left; _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev