perf/arm-cmn: Add sysfs identifier
authorRobin Murphy <robin.murphy@arm.com>
Mon, 12 Jun 2023 17:16:33 +0000 (18:16 +0100)
committerWill Deacon <will@kernel.org>
Fri, 16 Jun 2023 09:28:21 +0000 (10:28 +0100)
commita1c45d3ebd30cf8b9b1131c1335d603f3c46999c
tree4dd226888e717ffef21d0f7e95b0d984f8980bb0
parent7819e05a0dceac20c5ff78ec9b252faf3b76b824
perf/arm-cmn: Add sysfs identifier

Expose a sysfs identifier encapsulating the CMN part number and revision
so that jevents can narrow down a fundamental set of possible events for
calculating metrics. Configuration-dependent aspects - such as whether a
given node type is present, and/or a given node ID is valid - are still
not covered, and in general it's hard to see how userspace could handle
them, so we won't be removing any data or validation logic from the
driver any time soon, but at least it's a step in a useful direction.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Tested-by: Jing Zhang <renyu.zj@linux.alibaba.com>
Link: https://lore.kernel.org/r/b8a14c14fcdf028939ebf57849863e8ae01743de.1686588640.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm-cmn.c