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

Uros Bizjak
2026-03-18T09:18:09Z

On Wed, Mar 18, 2026 at 10:08 AM Uros Bizjak <ubizjak@gmail.com> 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@gmail.com>
> Acked-by: "Peter Zijlstra (Intel)" <peterz@infradead.org>

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

Uros.