Re: [PATCH v2 2/2] x86/mce: Avoid arming periodic polling timer when not required
From: Aaron Tomlin
Date: Wed Sep 02 2026 - 21:26:37 EST
On Wed, Sep 02, 2026 at 10:15:27AM -0700, Luck, Tony wrote:
> Hi Aaron,
>
> You have one small bug. Your check whether mce_poll_banks is empty looks
> at all MAX_NR_BANKS (64). But all Intel systems implement fewer banks,
> and only clear the bits for banks that exist, leaving some upper bits
> set in the bitmask.
>
> This means the timer keeps running.
>
> Please send a v3 with the updates to the commit message listed above,
> and with the change below folded into your change.
>
> Thanks
>
> -Tony
Hi Tony,
Indeed, since mce_poll_banks is initialised to ~0UL across all
MAX_NR_BANKS, the unimplemented upper bits above mce_num_banks remained
set, preventing bitmap_empty() from ever returning true.
DEFINE_PER_CPU(mce_banks_t, mce_poll_banks) = {
[0 ... BITS_TO_LONGS(MAX_NR_BANKS)-1] = ~0UL
};
I will send out the v3 series shortly. Thank you.
Kind regards,
--
Aaron Tomlin