From: Anshuman Khandual Date: Mon, 10 Jun 2013 05:53:29 +0000 (+0530) Subject: powerpc/perf: BHRB filter configuration should follow the task X-Git-Tag: v5.15~19611^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff3d79dc12c2ed38483f6c1e0f26fde430f27c9d;p=platform%2Fkernel%2Flinux-starfive.git powerpc/perf: BHRB filter configuration should follow the task When the task moves around the system, the corresponding cpuhw per cpu strcuture should be popullated with the BHRB filter request value so that PMU could be configured appropriately with that during the next call into power_pmu_enable(). Signed-off-by: Anshuman Khandual Acked-by: Michael Neuling Signed-off-by: Benjamin Herrenschmidt --- diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c index a3985ae..24a45f9 100644 --- a/arch/powerpc/perf/core-book3s.c +++ b/arch/powerpc/perf/core-book3s.c @@ -1252,8 +1252,11 @@ nocheck: ret = 0; out: - if (has_branch_stack(event)) + if (has_branch_stack(event)) { power_pmu_bhrb_enable(event); + cpuhw->bhrb_filter = ppmu->bhrb_filter_map( + event->attr.branch_sample_type); + } perf_pmu_enable(event->pmu); local_irq_restore(flags);