perf/arm-cmn: Rework DTC counters (again)
authorRobin Murphy <robin.murphy@arm.com>
Fri, 20 Oct 2023 17:51:26 +0000 (18:51 +0100)
committerWill Deacon <will@kernel.org>
Mon, 23 Oct 2023 12:45:42 +0000 (13:45 +0100)
commit7633ec2c262fab3e7c5bf3cd3876b5748f584a57
tree7dc6fdeb08cc9215e32c57fda6cc854325b0de41
parente3e73f511c49c741f6309862c2248958ad77bbaa
perf/arm-cmn: Rework DTC counters (again)

The bitmap-based scheme for tracking DTC counter usage turns out to be a
complete dead-end for its imagined purpose, since by the time we have to
keep track of a per-DTC counter index anyway, we already have enough
information to make the bitmap itself redundant. Revert the remains of
it back to almost the original scheme, but now expanded to track per-DTC
indices, in preparation for making use of them in anger.

Note that since cycle count events always use a dedicated counter on a
single DTC, we reuse the field to encode their DTC index directly.

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