[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<SN7PR12MB732408E54E6C19B89D891994D61DA@SN7PR12MB7324.namprd12.prod.outlook.com>
Date: Tue, 23 Sep 2025 12:09:00 +0000
From: Ciju Rajan K <crajank@...dia.com>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
CC: "hdegoede@...hat.com" <hdegoede@...hat.com>, "tglx@...utronix.de"
<tglx@...utronix.de>, Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
LKML <linux-kernel@...r.kernel.org>, "christophe.jaillet@...adoo.fr"
<christophe.jaillet@...adoo.fr>, "platform-driver-x86@...r.kernel.org"
<platform-driver-x86@...r.kernel.org>, Vadim Pasternak <vadimp@...dia.com>
Subject: RE: [PATCH platform-next v2 2/2] [PATCH platform-next 2/2]
platform/mellanox: mlxreg-hotplug: Add support for handling interrupt storm
Hi Ilpo,
Thanks for the review.
> > +
> > + /* Interrupt storm handling logic. */
> > + if (data->wmark_cntr == 0)
> > + data->wmark_window = jiffies +
> > +
> msecs_to_jiffies(MLXREG_HOTPLUG_WM_WINDOW_MS);
>
> Please use braces for multi-line if blocks.
Done.
> > +
> > + if (data->wmark_cntr >= MLXREG_HOTPLUG_WM_COUNTER - 1) {
> > + if (time_after(data->wmark_window, jiffies)) {
> > + dev_err(priv->dev,
> > + "Storming bit %d (label: %s) - interrupt masked
> permanently. Replace broken HW.",
> > + bit, data->label);
> > + /* Mark bit as storming. */
> > + item->storming_bits |= BIT(bit);
> > + continue;
> > + }
> > + data->wmark_cntr = 0;
> > + }
> > + data->wmark_cntr++;
>
> I think this should be in else block to allow recalculation of the time
> window when the counter wraps.
Good catch. Otherwise, time window will never get reset. Fixed in the next version (on the way).
Thanks
Ciju
Powered by blists - more mailing lists