Commit ff3d79dc authored by Anshuman Khandual's avatar Anshuman Khandual Committed by Benjamin Herrenschmidt

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: default avatarAnshuman Khandual <khandual@linux.vnet.ibm.com>
Acked-by: default avatarMichael Neuling <mikey@neuling.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 7689bdca
...@@ -1252,8 +1252,11 @@ static int power_pmu_add(struct perf_event *event, int ef_flags) ...@@ -1252,8 +1252,11 @@ static int power_pmu_add(struct perf_event *event, int ef_flags)
ret = 0; ret = 0;
out: out:
if (has_branch_stack(event)) if (has_branch_stack(event)) {
power_pmu_bhrb_enable(event); power_pmu_bhrb_enable(event);
cpuhw->bhrb_filter = ppmu->bhrb_filter_map(
event->attr.branch_sample_type);
}
perf_pmu_enable(event->pmu); perf_pmu_enable(event->pmu);
local_irq_restore(flags); local_irq_restore(flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment