ff44b1ca | 16-Jan-2025 |
Ai Chao <aichao@kylinos.cn> |
platform/mellanox: mlxreg-io: use sysfs_emit() instead of sprintf()
Follow the advice in Documentation/filesystems/sysfs.rst: show() should only use sysfs_emit() or sysfs_emit_at() when formatting t
platform/mellanox: mlxreg-io: use sysfs_emit() instead of sprintf()
Follow the advice in Documentation/filesystems/sysfs.rst: show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space.
Signed-off-by: Ai Chao <aichao@kylinos.cn> Acked-by: Vadim Pasternak <vadimp@nvidia.com> Link: https://lore.kernel.org/r/20250116081129.2902274-1-aichao@kylinos.cn Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|
fcf1b6f8 | 16-Jan-2025 |
Ai Chao <aichao@kylinos.cn> |
platform/mellanox: mlxreg-hotplug: use sysfs_emit() instead of sprintf()
Follow the advice in Documentation/filesystems/sysfs.rst: show() should only use sysfs_emit() or sysfs_emit_at() when formatt
platform/mellanox: mlxreg-hotplug: use sysfs_emit() instead of sprintf()
Follow the advice in Documentation/filesystems/sysfs.rst: show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space.
Signed-off-by: Ai Chao <aichao@kylinos.cn> Acked-by: Vadim Pasternak <vadimp@nvidia.com> Link: https://lore.kernel.org/r/20250116081000.2900435-1-aichao@kylinos.cn Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|
8e3b3e16 | 09-Jan-2025 |
Shravan Kumar Ramani <shravankr@nvidia.com> |
platform/mellanox: mlxbf-pmc: Add support for clock_measure performance block
The HW clock_measure counter info is passed to the driver from ACPI. Create a new sub-directory for clock_measure events
platform/mellanox: mlxbf-pmc: Add support for clock_measure performance block
The HW clock_measure counter info is passed to the driver from ACPI. Create a new sub-directory for clock_measure events and provide read access to the user. Writes are blocked since the fields are RO.
Signed-off-by: Shravan Kumar Ramani <shravankr@nvidia.com> Reviewed-by: David Thompson <davthompson@nvidia.com> Reviewed-by: Vadim Pasternak <vadimp@nvidia.com> Link: https://lore.kernel.org/r/6ea0699497479dfde0a52fcb28aef55aee1bbc0b.1736413033.git.shravankr@nvidia.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|
c0459eeb | 22-Feb-2024 |
Luiz Capitulino <luizcap@redhat.com> |
platform/mellanox: mlxbf-pmc: Ignore unsupported performance blocks
Currently, the driver has two behaviors to deal with new & unsupported performance blocks reported by the firmware:
1. For regis
platform/mellanox: mlxbf-pmc: Ignore unsupported performance blocks
Currently, the driver has two behaviors to deal with new & unsupported performance blocks reported by the firmware:
1. For register and unknown block types, the driver will fail to load with the following error message:
[ 4510.956369] mlxbf-pmc: probe of MLNXBFD2:00 failed with error -22
2. For counter and crspace blocks, the driver will load and sysfs files will be created but getting the contents of event_list or trying to setup the counter will fail
Instead, let's ignore and log unsupported blocks. This means the driver will always load and unsupported blocks will never show up in sysfs.
Signed-off-by: Luiz Capitulino <luizcap@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/f8e2e6210b43e825b69824b420c801cd513d401d.1708635408.git.luizcap@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|
0d46439b | 22-Feb-2024 |
Luiz Capitulino <luizcap@redhat.com> |
platform/mellanox: mlxbf-pmc: mlxbf_pmc_event_list(): make size ptr optional
The mlxbf_pmc_event_list() function returns a pointer to an array of supported events and the array size. The array size
platform/mellanox: mlxbf-pmc: mlxbf_pmc_event_list(): make size ptr optional
The mlxbf_pmc_event_list() function returns a pointer to an array of supported events and the array size. The array size is returned via a pointer passed as an argument, which is mandatory.
However, we want to be able to use mlxbf_pmc_event_list() just to check if a block name is implemented/supported. For this usage passing the size argument is not necessary so let's make it optional.
Signed-off-by: Luiz Capitulino <luizcap@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/182de8ec6b9c33152f2ba6b248c35b0311abf5e4.1708635408.git.luizcap@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|
1ae9ffd3 | 13-Feb-2024 |
Shravan Kumar Ramani <shravankr@nvidia.com> |
platform/mellanox: mlxbf-pmc: Cleanup signed/unsigned mix-up
Use unsigned integer types for register values and array indices. Use %u instead of %d accordingly.
Signed-off-by: Shravan Kumar Ramani
platform/mellanox: mlxbf-pmc: Cleanup signed/unsigned mix-up
Use unsigned integer types for register values and array indices. Use %u instead of %d accordingly.
Signed-off-by: Shravan Kumar Ramani <shravankr@nvidia.com> Link: https://lore.kernel.org/r/d8548c70339a29258a906b2b518e5c48f669795c.1707808180.git.shravankr@nvidia.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|
fd23023e | 13-Feb-2024 |
Shravan Kumar Ramani <shravankr@nvidia.com> |
platform/mellanox: mlxbf-pmc: Replace uintN_t with kernel-style types
Use u8, u32 and u64 instead of respective uintN_t types. Remove unnecessary newlines for function argument lists.
Signed-off-by
platform/mellanox: mlxbf-pmc: Replace uintN_t with kernel-style types
Use u8, u32 and u64 instead of respective uintN_t types. Remove unnecessary newlines for function argument lists.
Signed-off-by: Shravan Kumar Ramani <shravankr@nvidia.com> Link: https://lore.kernel.org/r/39be055af3506ce6f843d11e45d71620f2a96e26.1707808180.git.shravankr@nvidia.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|
732c35ce | 17-Jan-2024 |
Shravan Kumar Ramani <shravankr@nvidia.com> |
platform/mellanox: mlxbf-pmc: Fix offset calculation for crspace events
The event selector fields for 2 counters are contained in one 32-bit register and the current logic does not account for this.
platform/mellanox: mlxbf-pmc: Fix offset calculation for crspace events
The event selector fields for 2 counters are contained in one 32-bit register and the current logic does not account for this.
Fixes: 423c3361855c ("platform/mellanox: mlxbf-pmc: Add support for BlueField-3") Signed-off-by: Shravan Kumar Ramani <shravankr@nvidia.com> Reviewed-by: David Thompson <davthompson@nvidia.com> Reviewed-by: Vadim Pasternak <vadimp@nvidia.com> Link: https://lore.kernel.org/r/8834cfa496c97c7c2fcebcfca5a2aa007e20ae96.1705485095.git.shravankr@nvidia.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
3494a594 | 01-Dec-2023 |
Kunwu Chan <chentao@kylinos.cn> |
platform/mellanox: Check devm_hwmon_device_register_with_groups() return value
devm_hwmon_device_register_with_groups() returns an error pointer upon failure. Check its return value for errors.
Com
platform/mellanox: Check devm_hwmon_device_register_with_groups() return value
devm_hwmon_device_register_with_groups() returns an error pointer upon failure. Check its return value for errors.
Compile-tested only.
Fixes: 1a218d312e65 ("platform/mellanox: mlxbf-pmc: Add Mellanox BlueField PMC driver") Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Suggested-by: Vadim Pasternak <vadimp@nvidia.com> Signed-off-by: Kunwu Chan <chentao@kylinos.cn> Reviewed-by: Vadim Pasternak <vadimp@nvidia.com> Link: https://lore.kernel.org/r/20231201055447.2356001-1-chentao@kylinos.cn [ij: split the change into two] Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|