arm_pmu: factor out PMU matching
authorMark Rutland <mark.rutland@arm.com>
Fri, 30 Sep 2022 11:18:43 +0000 (12:18 +0100)
committerWill Deacon <will@kernel.org>
Mon, 7 Nov 2022 16:16:20 +0000 (16:16 +0000)
commit6349a2470d07561bc25e34681985c6ff9c807dfb
tree391462fc8667872612058b49dfaf032a8ad6405c
parentad51b5043bb39e0d715e8ad910fa5ac899ebc70b
arm_pmu: factor out PMU matching

A subsequent patch will rework the ACPI probing of PMUs, and we'll need
to match a CPU with a known cpuid in two separate paths.

Factor out the matching logic into a helper function so that it can be
reused.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Pierre Gondois <pierre.gondois@arm.com>
Cc: Will Deacon <will@kernel.org>
Reviewed-and-tested-by: Pierre Gondois <pierre.gondois@arm.com>
Link: https://lore.kernel.org/r/20220930111844.1522365-3-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm_pmu_acpi.c