[PATCH 2/4] ARM: Move asm statements accessing TTBCR into C functions

Linus Walleij linus.walleij at linaro.org
Wed Feb 21 13:37:49 PST 2024


On Wed, Feb 14, 2024 at 4:23 PM Ard Biesheuvel <ardb at kernel.org> wrote:
> On Tue, 23 Jan 2024 at 22:16, Linus Walleij <linus.walleij at linaro.org> wrote:

> > +static inline void cpu_set_ttbcr(unsigned int ttbcr)
> > +{
> > +       asm volatile("mcr p15, 0, %0, c2, c0, 2" : : "r" (ttbcr));
>
> Nit: the 'volatile' is unnecessary here - there are no output
> operands, so the compiler has to assume that the statement has side
> effects.

Somehow I missed this in my v2 patch set, I fixed it for v3 now.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list