Skip to content

Commit 4d5a768

Browse files
rmurphy-armwilldeacon
authored andcommitted
perf: Add driver for Arm NI-700 interconnect PMU
The Arm NI-700 Network-on-Chip Interconnect has a relatively straightforward design with a hierarchy of voltage, power, and clock domains, where each clock domain then contains a number of interface units and a PMU which can monitor events thereon. As such, it begets a relatively straightforward driver to interface those PMUs with perf. Even more so than with arm-cmn, users will require detailed knowledge of the wider system topology in order to meaningfully analyse anything, since the interconnect itself cannot know what lies beyond the boundary of each inscrutably-numbered interface. Given that, for now they are also expected to refer to the NI-700 documentation for the relevant event IDs to provide as well. An identifier is implemented so we can come back and add jevents if anyone really wants to. Signed-off-by: Robin Murphy <[email protected]> Link: https://lore.kernel.org/r/9933058d0ab8138c78a61cd6852ea5d5ff48e393.1725470837.git.robin.murphy@arm.com Signed-off-by: Will Deacon <[email protected]>
1 parent abbe74d commit 4d5a768

File tree

5 files changed

+807
-0
lines changed

5 files changed

+807
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
====================================
2+
Arm Network-on Chip Interconnect PMU
3+
====================================
4+
5+
NI-700 and friends implement a distinct PMU for each clock domain within the
6+
interconnect. Correspondingly, the driver exposes multiple PMU devices named
7+
arm_ni_<x>_cd_<y>, where <x> is an (arbitrary) instance identifier and <y> is
8+
the clock domain ID within that particular instance. If multiple NI instances
9+
exist within a system, the PMU devices can be correlated with the underlying
10+
hardware instance via sysfs parentage.
11+
12+
Each PMU exposes base event aliases for the interface types present in its clock
13+
domain. These require qualifying with the "eventid" and "nodeid" parameters
14+
to specify the event code to count and the interface at which to count it
15+
(per the configured hardware ID as reflected in the xxNI_NODE_INFO register).
16+
The exception is the "cycles" alias for the PMU cycle counter, which is encoded
17+
with the PMU node type and needs no further qualification.

Documentation/admin-guide/perf/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Performance monitor support
1616
starfive_starlink_pmu
1717
arm-ccn
1818
arm-cmn
19+
arm-ni
1920
xgene-pmu
2021
arm_dsu_pmu
2122
thunderx2-pmu

drivers/perf/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ config ARM_CMN
4848
Support for PMU events monitoring on the Arm CMN-600 Coherent Mesh
4949
Network interconnect.
5050

51+
config ARM_NI
52+
tristate "Arm NI-700 PMU support"
53+
depends on ARM64 || COMPILE_TEST
54+
help
55+
Support for PMU events monitoring on the Arm NI-700 Network-on-Chip
56+
interconnect and family.
57+
5158
config ARM_PMU
5259
depends on ARM || ARM64
5360
bool "ARM PMU framework"

drivers/perf/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ obj-$(CONFIG_ARM_CCI_PMU) += arm-cci.o
33
obj-$(CONFIG_ARM_CCN) += arm-ccn.o
44
obj-$(CONFIG_ARM_CMN) += arm-cmn.o
55
obj-$(CONFIG_ARM_DSU_PMU) += arm_dsu_pmu.o
6+
obj-$(CONFIG_ARM_NI) += arm-ni.o
67
obj-$(CONFIG_ARM_PMU) += arm_pmu.o arm_pmu_platform.o
78
obj-$(CONFIG_ARM_PMU_ACPI) += arm_pmu_acpi.o
89
obj-$(CONFIG_ARM_PMUV3) += arm_pmuv3.o

0 commit comments

Comments
 (0)