Re: [PATCH] x86/asm: Use alternative_input() in amd_clear_divider()

From: Ingo Molnar
Date: Sat Mar 15 2025 - 17:29:37 EST



* Borislav Petkov <bp@xxxxxxxxx> wrote:

> On Fri, Mar 14, 2025 at 09:14:38AM +0100, Uros Bizjak wrote:
> > Use higher-level API to declare assembly with alternatives.
> >
> > bloat-o-meter reports no code size changes.
> >
> > Signed-off-by: Uros Bizjak <ubizjak@xxxxxxxxx>
> > Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> > Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> > Cc: Borislav Petkov <bp@xxxxxxxxx>
> > Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
> > Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
> > ---
> > arch/x86/include/asm/processor.h | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
>
> I'm getting tired of patches which cause unnecessary code churn. Please stop
> this. If it ain't broke, it doesn't need fixing!

So why does the higher level alternative_input() API exist? If it
shouldn't exist then we should remove it. If it exists, we should use
it consistently instead of open-coding its equivalent.

Cleanups like this, especially if they are clearly part of an effort to
improve x86 code generation in this area, are not 'code churn', why
would they be?

Thanks,

Ingo