Re: [PATCH v2 -tip] x86/percpu: Use C for arch_raw_cpu_ptr()

From: Linus Torvalds
Date: Fri Oct 13 2023 - 12:39:06 EST


On Fri, 13 Oct 2023 at 04:53, Uros Bizjak <ubizjak@xxxxxxxxx> wrote:
>
> Maybe we should go with what Clang expects. %a with "i" constraint is
> also what GCC handles, because
>
> ‘i’: An immediate integer operand (one with constant value) is
> allowed. This includes symbolic constants whose values will be known
> only at assembly time or later.

This looks fine to me, and would seem to be the simplest way to have
both gcc and clang be happy with things.

All these uses seem to be immediate addresses, as any actual dynamic
ones will use a proper "m" constraint (and no operand modifiers)

Linus