[SRU][J/N:linux-bluefield][PATCH v1 0/2] Updates to mlxbf-pmc

Shravan Kumar Ramani shravankr at nvidia.com
Wed Jul 9 09:19:47 UTC 2025


This submission addresses the following 2 issues:
1. Fix duplicate event ID in event_list
BugLink: https://bugs.launchpad.net/bugs/2115400

SRU Justification:

[Impact]
Same ID (103) was assigned to both GDC_BANK0_G_RSE_PIPE_CACHE_DATA0 and
GDC_BANK0_G_RSE_PIPE_CACHE_DATA1. This could lead to incorrect event mapping.

[Fix]
The fix is to remove the duplicate ID and assign the correct ID instead to
GDC_BANK0_G_RSE_PIPE_CACHE_DATA1.

[Test Case]
Without the fix, programming event ID of 104 would return an error and there
would be no way to assign the counter to track GDC_BANK0_G_RSE_PIPE_CACHE_DATA1.
With the fix, event ID 104 should be programmable.

[Regression Potential]
Minimal

2. Validate user input for event/enable settings
BugLink: https://bugs.launchpad.net/bugs/2113758

SRU Justification:

[Impact]
The enable and event sysfs files are used to program and enable the performance
counters. However, they also seem to take invalid input, which should be handled
by the driver with an error.

[Fix]
Check "enable" input to allow only 0 or 1, and not other values. For "event"
info, check if the user input is a valid event number for the corresponding
block and if not, print an error message.

[Test Case]
Try invalid values to the "enable" sysfs in any block and it should not be
accepted by the driver.
For event sysfs, enter any event number that is not listed in the "event_list"
and validate that the driver does not accept this input.

[Regression Potential]
Minimal

Alok Tiwari (1):
  platform/mellanox: mlxbf-pmc: Fix duplicate event ID for CACHE_DATA1

Shravan Kumar Ramani (1):
  UBUNTU: SAUCE: mlxbf-pmc: Validate user input for event/enable

 drivers/platform/mellanox/mlxbf-pmc.c | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

-- 
2.43.2




More information about the kernel-team mailing list