mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
arm64: perf: Reject stand-alone CHAIN events for PMUv3
It doesn't make sense for a perf event to be configured as a CHAIN event in isolation, so extend the arm_pmu structure with a ->filter_match() function to allow the backend PMU implementation to reject CHAIN events early. Cc: <[email protected]> Reviewed-by: Suzuki K Poulose <[email protected]> Signed-off-by: Will Deacon <[email protected]>
This commit is contained in:
parent
d91680e687
commit
ca2b497253
3 changed files with 15 additions and 1 deletions
|
|
@ -485,7 +485,13 @@ static int armpmu_filter_match(struct perf_event *event)
|
|||
{
|
||||
struct arm_pmu *armpmu = to_arm_pmu(event->pmu);
|
||||
unsigned int cpu = smp_processor_id();
|
||||
return cpumask_test_cpu(cpu, &armpmu->supported_cpus);
|
||||
int ret;
|
||||
|
||||
ret = cpumask_test_cpu(cpu, &armpmu->supported_cpus);
|
||||
if (ret && armpmu->filter_match)
|
||||
return armpmu->filter_match(event);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ssize_t armpmu_cpumask_show(struct device *dev,
|
||||
|
|
|
|||
Loading…
Reference in a new issue