ARM: make get_current() and __my_cpu_offset() __always_inline
authorArd Biesheuvel <ardb@kernel.org>
Mon, 24 Jan 2022 22:32:51 +0000 (23:32 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Mon, 31 Jan 2022 15:06:35 +0000 (16:06 +0100)
commit4d5a643e738c6b6ccc1a05f6938643c3f08df29b
treeb30eec64ce43003e10bb7409cec7a23ec4ca1313
parent57a420435edcb0b947a74171bf49ada7a5892d4f
ARM: make get_current() and __my_cpu_offset() __always_inline

The get_current() and __my_cpu_offset() accessors evaluate to only a
single instruction emitted inline, but due to the size of the asm string
that is created for SMP+v6 configurations, the compiler assumes
otherwise, and may emit the functions out of line instead.

So use __always_inline to avoid this.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
arch/arm/include/asm/current.h
arch/arm/include/asm/percpu.h