diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2022-01-25 01:32:51 +0300 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2022-01-31 18:06:35 +0300 |
commit | 4d5a643e738c6b6ccc1a05f6938643c3f08df29b (patch) | |
tree | b30eec64ce43003e10bb7409cec7a23ec4ca1313 /arch/arm/include/asm/current.h | |
parent | 57a420435edcb0b947a74171bf49ada7a5892d4f (diff) | |
download | linux-4d5a643e738c6b6ccc1a05f6938643c3f08df29b.tar.xz |
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>
Diffstat (limited to 'arch/arm/include/asm/current.h')
-rw-r--r-- | arch/arm/include/asm/current.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/include/asm/current.h b/arch/arm/include/asm/current.h index 131a89bbec6b..1e1178bf176d 100644 --- a/arch/arm/include/asm/current.h +++ b/arch/arm/include/asm/current.h @@ -14,7 +14,7 @@ struct task_struct; extern struct task_struct *__current; -static inline __attribute_const__ struct task_struct *get_current(void) +static __always_inline __attribute_const__ struct task_struct *get_current(void) { struct task_struct *cur; |