Re: [PATCH v2 05/16] x86/mce: Cleanup bank processing on init

From: Luck, Tony
Date: Thu Feb 13 2025 - 17:32:40 EST


On Thu, Feb 13, 2025 at 04:45:54PM +0000, Yazen Ghannam wrote:
> From: Borislav Petkov <bp@xxxxxxx>
>
> Unify the bank preparation into __mcheck_cpu_init_clear_banks(), rename
> that function to what it does now - prepares banks. Do this so that
> generic and vendor banks init goes first so that settings done during
> that init can take effect before the first bank polling takes place.
>
> Move __mcheck_cpu_check_banks() into __mcheck_cpu_init_prepare_banks()
> as it already loops over the banks.
>
> Signed-off-by: Borislav Petkov <bp@xxxxxxx>
> Reviewed-by: Yazen Ghannam <yazen.ghannam@xxxxxxx>
> ---
>
> Notes:
> Link:
> https://lore.kernel.org/r/20221206173607.1185907-2-yazen.ghannam@xxxxxxx
>
> v1->v2:
> * New in v2, but based on old patch (see link).
> * Kept old tags for reference.
>
> arch/x86/include/asm/mce.h | 3 +-
> arch/x86/kernel/cpu/mce/core.c | 63 ++++++++++++------------------------------
> 2 files changed, 19 insertions(+), 47 deletions(-)
>
> diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
> index 2701aca04aec..36ff81c1b3b1 100644
> --- a/arch/x86/include/asm/mce.h
> +++ b/arch/x86/include/asm/mce.h
> @@ -290,8 +290,7 @@ DECLARE_PER_CPU(mce_banks_t, mce_poll_banks);
> enum mcp_flags {
> MCP_TIMESTAMP = BIT(0), /* log time stamp */
> MCP_UC = BIT(1), /* log uncorrected errors */
> - MCP_DONTLOG = BIT(2), /* only clear, don't log */

MCP_DONTLOG is removed in this patch. But no mention of this change in
the commit description.

-Tony