]> git.dujemihanovic.xyz Git - linux.git/commit
perf/arm-cmn: Revamp model detection
authorRobin Murphy <robin.murphy@arm.com>
Mon, 12 Jun 2023 17:16:32 +0000 (18:16 +0100)
committerWill Deacon <will@kernel.org>
Fri, 16 Jun 2023 09:28:21 +0000 (10:28 +0100)
commit7819e05a0dceac20c5ff78ec9b252faf3b76b824
tree7045135ab3550b64b5886f5d2f279703f4ade69f
parent95f5819738a7500b91e99151a03eb05be478ee6a
perf/arm-cmn: Revamp model detection

CMN implements a set of CoreSight-format peripheral ID registers which
in principle we should be able to use to identify the hardware. However
so far we have avoided trying to use the part number field since the
TRMs have all described it as "configuration dependent". It turns out,
though, that this is a quirk of the documentation generation process,
and in fact the part number should always be a stable well-defined field
which we can trust.

To that end, revamp our model detection to rely less on ACPI/DT, and
pave the way towards further using the hardware information as an
identifier for userspace jevent metrics. This includes renaming the
revision constants to maximise readability.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Link: https://lore.kernel.org/r/3c791eaae814b0126f9adbd5419bfb4a600dade7.1686588640.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm-cmn.c