Skip to content

Commit

Permalink
drivers/perf: hisi: add driver for HNS3 PMU
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Guangbin Huang authored and willdeacon committed Jul 6, 2022
1 parent 39915b6 commit 66637ab
Show file tree
Hide file tree
Showing 5 changed files with 1,689 additions and 0 deletions.
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -8944,6 +8944,12 @@ F: Documentation/admin-guide/perf/hisi-pcie-pmu.rst
F: Documentation/admin-guide/perf/hisi-pmu.rst
F: drivers/perf/hisilicon

HISILICON HNS3 PMU DRIVER
M: Guangbin Huang <[email protected]>
S: Supported
F: Documentation/admin-guide/perf/hns3-pmu.rst
F: drivers/perf/hisilicon/hns3_pmu.c

HISILICON QM AND ZIP Controller DRIVER
M: Zhou Wang <[email protected]>
L: [email protected]
Expand Down
10 changes: 10 additions & 0 deletions drivers/perf/hisilicon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,13 @@ config HISI_PCIE_PMU
RCiEP devices.
Adds the PCIe PMU into perf events system for monitoring latency,
bandwidth etc.

config HNS3_PMU
tristate "HNS3 PERF PMU"
depends on ARM64 || COMPILE_TEST
depends on PCI
help
Provide support for HNS3 performance monitoring unit (PMU) RCiEP
devices.
Adds the HNS3 PMU into perf events system for monitoring latency,
bandwidth etc.
1 change: 1 addition & 0 deletions drivers/perf/hisilicon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ obj-$(CONFIG_HISI_PMU) += hisi_uncore_pmu.o hisi_uncore_l3c_pmu.o \
hisi_uncore_pa_pmu.o hisi_uncore_cpa_pmu.o

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

0 comments on commit 66637ab

Please sign in to comment.