Add fields for interrupt storm handling.
Extend structure mlxreg_core_data with the following fields:
'wmark_cntr' - interrupt storm counter.
'wmark_window' - time window to count interrupts to check for storm.
Extend structure mlxreg_core_item with the following field:
'storming_bits' - interrupt storming bits mask.
Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
Signed-off-by: Ciju Rajan K <crajank@nvidia.com>
---
include/linux/platform_data/mlxreg.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/platform_data/mlxreg.h b/include/linux/platform_data/mlxreg.h
index f6cca7a035c7..453c8dfd7eb9 100644
--- a/include/linux/platform_data/mlxreg.h
+++ b/include/linux/platform_data/mlxreg.h
@@ -131,6 +131,8 @@ struct mlxreg_hotplug_device {
* @regnum: number of registers occupied by multi-register attribute;
* @slot: slot number, at which device is located;
* @secured: if set indicates that entry access is secured;
+ * @wmark_cntr: interrupt storm counter;
+ * @wmark_window: time window to count interrupts to check for storm;
*/
struct mlxreg_core_data {
char label[MLXREG_CORE_LABEL_MAX_SIZE];
@@ -151,6 +153,8 @@ struct mlxreg_core_data {
u8 regnum;
u8 slot;
u8 secured;
+ unsigned int wmark_cntr;
+ unsigned long wmark_window;
};
/**
@@ -167,6 +171,7 @@ struct mlxreg_core_data {
* @ind: element's index inside the group;
* @inversed: if 0: 0 for signal status is OK, if 1 - 1 is OK;
* @health: true if device has health indication, false in other case;
+ * @storming_bits: interrupt storming bits mask;
*/
struct mlxreg_core_item {
struct mlxreg_core_data *data;
@@ -180,6 +185,7 @@ struct mlxreg_core_item {
u8 ind;
u8 inversed;
u8 health;
+ u32 storming_bits;
};
/**
--
2.47.2
On Tue, 23 Sep 2025, Ciju Rajan K wrote:
> Add fields for interrupt storm handling.
> Extend structure mlxreg_core_data with the following fields:
> 'wmark_cntr' - interrupt storm counter.
> 'wmark_window' - time window to count interrupts to check for storm.
>
> Extend structure mlxreg_core_item with the following field:
> 'storming_bits' - interrupt storming bits mask.
>
> Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
> Signed-off-by: Ciju Rajan K <crajank@nvidia.com>
> ---
> include/linux/platform_data/mlxreg.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/include/linux/platform_data/mlxreg.h b/include/linux/platform_data/mlxreg.h
> index f6cca7a035c7..453c8dfd7eb9 100644
> --- a/include/linux/platform_data/mlxreg.h
> +++ b/include/linux/platform_data/mlxreg.h
> @@ -131,6 +131,8 @@ struct mlxreg_hotplug_device {
> * @regnum: number of registers occupied by multi-register attribute;
> * @slot: slot number, at which device is located;
> * @secured: if set indicates that entry access is secured;
> + * @wmark_cntr: interrupt storm counter;
> + * @wmark_window: time window to count interrupts to check for storm;
> */
> struct mlxreg_core_data {
> char label[MLXREG_CORE_LABEL_MAX_SIZE];
> @@ -151,6 +153,8 @@ struct mlxreg_core_data {
> u8 regnum;
> u8 slot;
> u8 secured;
> + unsigned int wmark_cntr;
> + unsigned long wmark_window;
> };
>
> /**
> @@ -167,6 +171,7 @@ struct mlxreg_core_data {
> * @ind: element's index inside the group;
> * @inversed: if 0: 0 for signal status is OK, if 1 - 1 is OK;
> * @health: true if device has health indication, false in other case;
> + * @storming_bits: interrupt storming bits mask;
> */
> struct mlxreg_core_item {
> struct mlxreg_core_data *data;
> @@ -180,6 +185,7 @@ struct mlxreg_core_item {
> u8 ind;
> u8 inversed;
> u8 health;
> + u32 storming_bits;
> };
>
> /**
>
I don't know what's the benefit of having this as a separate patch, the
fields are getting used in patch 2 so it would feel natural to introduce
them there so the entire change would end up into the same commit.
--
i.
© 2016 - 2026 Red Hat, Inc.