Re: [PATCH] x86/asm: Switch clflush alternatives to use %a address operand modifier

From: Uros Bizjak

Date: Wed Mar 18 2026 - 05:25:01 EST


On Wed, Mar 18, 2026 at 10:08 AM Uros Bizjak <ubizjak@xxxxxxxxx> wrote:
>
> The inline asm used with alternative_input() specifies the address
> operand for clflush with the "a" input operand constraint and
> explicit "(%[addr])" dereference:
>
> "clflush (%[addr])", [addr] "a" (addr)
>
> This forces the pointer into %rax and manually encodes the memory
> operand in the template. Instead, use the %a address operand
> modifier and relax the constraint from "a" to "r":
>
> "clflush %a[addr]", [addr] "r" (addr)
>
> This lets the compiler choose the register while generating the
> correct addressing mode.
>
> No functional change intended.
>
> Signed-off-by: Uros Bizjak <ubizjak@xxxxxxxxx>
> Acked-by: "Peter Zijlstra (Intel)" <peterz@xxxxxxxxxxxxx>

Whoops, I copied the wrong stack of emails. This patch is *NOT* Acked-by peter.

Uros.