Commit 1a218d31 authored by Shravan Kumar Ramani's avatar Shravan Kumar Ramani Committed by Hans de Goede
Browse files

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: default avatarShravan Kumar Ramani <shravankr@nvidia.com>
Reviewed-by: default avatarVadim Pasternak <vadimp@nvidia.com>
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/4e19a1e5bf4197ad27fc57981fd280eaebd23577.1602160468.git.shravankr@nvidia.com


Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent e8a60aa7
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -56,4 +56,14 @@ config MLXBF_BOOTCTL
	  to the userspace tools, to be used in conjunction with the eMMC
	  device driver to do necessary initial swap of the boot partition.

config MLXBF_PMC
	tristate "Mellanox BlueField Performance Monitoring Counters driver"
	depends on ARM64
	depends on HWMON
	depends on ACPI
	help
	  Say y here to enable PMC support. The PMC driver provides access
	  to performance monitoring counters within various blocks in the
	  Mellanox BlueField SoC via a sysfs interface.

endif # MELLANOX_PLATFORM
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
# Mellanox Platform-Specific Drivers
#
obj-$(CONFIG_MLXBF_BOOTCTL)	+= mlxbf-bootctl.o
obj-$(CONFIG_MLXBF_PMC)		+= mlxbf-pmc.o
obj-$(CONFIG_MLXBF_TMFIFO)	+= mlxbf-tmfifo.o
obj-$(CONFIG_MLXREG_HOTPLUG)	+= mlxreg-hotplug.o
obj-$(CONFIG_MLXREG_IO) += mlxreg-io.o
+1478 −0

File added.

Preview size limit exceeded, changes collapsed.