Skip to content

Commit 66637ab

Browse files
Guangbin Huangwilldeacon
authored andcommitted
drivers/perf: hisi: add driver for HNS3 PMU
HNS3(HiSilicon Network System 3) PMU is RCiEP device in HiSilicon SoC NIC, supports collection of performance statistics such as bandwidth, latency, packet rate and interrupt rate. NIC of each SICL has one PMU device for it. Driver registers each PMU device to perf, and exports information of supported events, filter mode of each event, bdf range, hardware clock frequency, identifier and so on via sysfs. Each PMU device has its own registers of control, counters and interrupt, and it supports 8 hardware events, each hardward event has its own registers for configuration, counters and interrupt. Filter options contains: config - select event port - select physical port of nic tc - select tc(must be used with port) func - select PF/VF queue - select queue of PF/VF(must be used with func) intr - select interrupt number(must be used with func) global - select all functions of IO DIE Signed-off-by: Guangbin Huang <[email protected]> Reviewed-by: John Garry <[email protected]> Reviewed-by: Shaokun Zhang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 39915b6 commit 66637ab

File tree

5 files changed

+1689
-0
lines changed

5 files changed

+1689
-0
lines changed

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8944,6 +8944,12 @@ F: Documentation/admin-guide/perf/hisi-pcie-pmu.rst
89448944
F: Documentation/admin-guide/perf/hisi-pmu.rst
89458945
F: drivers/perf/hisilicon
89468946

8947+
HISILICON HNS3 PMU DRIVER
8948+
M: Guangbin Huang <[email protected]>
8949+
S: Supported
8950+
F: Documentation/admin-guide/perf/hns3-pmu.rst
8951+
F: drivers/perf/hisilicon/hns3_pmu.c
8952+
89478953
HISILICON QM AND ZIP Controller DRIVER
89488954
M: Zhou Wang <[email protected]>
89498955

drivers/perf/hisilicon/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,13 @@ config HISI_PCIE_PMU
1414
RCiEP devices.
1515
Adds the PCIe PMU into perf events system for monitoring latency,
1616
bandwidth etc.
17+
18+
config HNS3_PMU
19+
tristate "HNS3 PERF PMU"
20+
depends on ARM64 || COMPILE_TEST
21+
depends on PCI
22+
help
23+
Provide support for HNS3 performance monitoring unit (PMU) RCiEP
24+
devices.
25+
Adds the HNS3 PMU into perf events system for monitoring latency,
26+
bandwidth etc.

drivers/perf/hisilicon/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ obj-$(CONFIG_HISI_PMU) += hisi_uncore_pmu.o hisi_uncore_l3c_pmu.o \
44
hisi_uncore_pa_pmu.o hisi_uncore_cpa_pmu.o
55

66
obj-$(CONFIG_HISI_PCIE_PMU) += hisi_pcie_pmu.o
7+
obj-$(CONFIG_HNS3_PMU) += hns3_pmu.o

0 commit comments

Comments
 (0)