Re: [PATCH 3/4] x86/mce: Get rid of msr_ops

From: Borislav Petkov
Date: Mon Sep 20 2021 - 04:32:24 EST


On Sun, Sep 19, 2021 at 09:47:51PM -0700, Luck, Tony wrote:
> I think this would be easier on the eyeballs with
> a couple of helper functions:
>
> if (mce_flags.smca)
> return smca_msr_number(bank, reg);
> else
> return msr_number(bank, reg);
>
> with the switch (reg) in each of those helper functions.

I'll switch it to

if ()
else

but please don't make me add more helper functions. Those MSR defines
already have "SMCA" and "IA32" in their names so that should be a good
enough differentiation, I'd say.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette