Skip to content

Commit 1a218d3

Browse files
shravankumarrjwrdegoede
authored andcommitted
platform/mellanox: mlxbf-pmc: Add Mellanox BlueField PMC driver
The performance modules in BlueField are present in several hardware blocks and each block provides access to these stats either through counters that can be programmed to monitor supported events or through memory-mapped registers that hold the relevant information. The hardware blocks that include a performance module are: * Tile (block containing 2 cores and a shared L2 cache) * TRIO (PCIe root complex) * MSS (Memory Sub-system containing the Memory Controller and L3 cache) * GIC (Interrupt controller) * SMMU (System Memory Management Unit) The mlx_pmc driver provides access to all of these performance modules through a hwmon sysfs interface. v2 --> v3 Update copyright info. v1 --> v2 Remove unused headers. Add comma to arrays where last line is not a termination. Use kstrtoint in place of sscanf. UUID manipulation follows drivers/platform/mellanox/mlxbf-bootctl.c Signed-off-by: Shravan Kumar Ramani <[email protected]> Reviewed-by: Vadim Pasternak <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Link: https://lore.kernel.org/r/4e19a1e5bf4197ad27fc57981fd280eaebd23577.1602160468.git.shravankr@nvidia.com Signed-off-by: Hans de Goede <[email protected]>
1 parent e8a60aa commit 1a218d3

File tree

3 files changed

+1489
-0
lines changed

3 files changed

+1489
-0
lines changed

drivers/platform/mellanox/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,14 @@ config MLXBF_BOOTCTL
5656
to the userspace tools, to be used in conjunction with the eMMC
5757
device driver to do necessary initial swap of the boot partition.
5858

59+
config MLXBF_PMC
60+
tristate "Mellanox BlueField Performance Monitoring Counters driver"
61+
depends on ARM64
62+
depends on HWMON
63+
depends on ACPI
64+
help
65+
Say y here to enable PMC support. The PMC driver provides access
66+
to performance monitoring counters within various blocks in the
67+
Mellanox BlueField SoC via a sysfs interface.
68+
5969
endif # MELLANOX_PLATFORM

drivers/platform/mellanox/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# Mellanox Platform-Specific Drivers
55
#
66
obj-$(CONFIG_MLXBF_BOOTCTL) += mlxbf-bootctl.o
7+
obj-$(CONFIG_MLXBF_PMC) += mlxbf-pmc.o
78
obj-$(CONFIG_MLXBF_TMFIFO) += mlxbf-tmfifo.o
89
obj-$(CONFIG_MLXREG_HOTPLUG) += mlxreg-hotplug.o
910
obj-$(CONFIG_MLXREG_IO) += mlxreg-io.o

0 commit comments

Comments
 (0)