platform/mellanox: mlxbf-pmc: Add Mellanox BlueField PMC driver
authorShravan Kumar Ramani <shravankr@nvidia.com>
Thu, 8 Oct 2020 12:37:17 +0000 (08:37 -0400)
committerHans de Goede <hdegoede@redhat.com>
Wed, 28 Oct 2020 11:00:24 +0000 (12:00 +0100)
commit1a218d312e65ec396b2739056a8ea78493015f21
tree089b65b36c69fbbcecf8a0e9c1ea25d9fd153301
parente8a60aa7404bfef37705da5607c97737073ac38d
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 <shravankr@nvidia.com>
Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/4e19a1e5bf4197ad27fc57981fd280eaebd23577.1602160468.git.shravankr@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/mellanox/Kconfig
drivers/platform/mellanox/Makefile
drivers/platform/mellanox/mlxbf-pmc.c [new file with mode: 0644]