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

From: Uros Bizjak
Date: Sun Mar 16 2025 - 04:40:49 EST


On Sat, Mar 15, 2025 at 10:37 PM Borislav Petkov <bp@xxxxxxxxx> wrote:
>
> On Sat, Mar 15, 2025 at 10:29:25PM +0100, Ingo Molnar wrote:
> > 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?
>
> Because this is not improving anything, IMO. It is simply writing it
> differently, perhaps obscuring it more in the process.
>
> And I, just like hpa, would need to go look at alternative_input() to figure
> out what really happens there.
>
> Dunno, maybe we should really remove alternative_input() instead...

Please note that all other functions involving ALTERNATIVE in
asm/processor.h use "alternative" API.

Uros.