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

From: Linus Torvalds
Date: Thu Oct 19 2023 - 14:06:30 EST


On Thu, 19 Oct 2023 at 10:21, Uros Bizjak <ubizjak@xxxxxxxxx> wrote:
>
> > A compiler that were to rematerializes an inline asm (instead of
> > spilling) would be a bad joke. That's not an optimization, that's just
> > a crazy bad compiler with a code generation bug.
>
> But that is what the compiler does without volatile.

Do you actually have a real case of that, or are basing it purely off
insane documentation?

Because remat of inline asm really _is_ insane.

Linus