[RFC PATCH v2 02/13] arm64: percpu: Annotate __kern_my_cpu_offset() as '__always_inline'
Karl Mehltretter
kmehltretter at gmail.com
Tue Oct 27 20:31:16 PDT 2026
From: Will Deacon <will at kernel.org>
Allow the use of per-cpu variables from noinstr functions by marking
__kern_my_cpu_offset() as '__always_inline'. This will later be relied
upon to detect stack overflow of the overflow stack from noinstr C code.
Signed-off-by: Will Deacon <will at kernel.org>
Reviewed-by: Linus Walleij <linusw at kernel.org>
Reviewed-by: Jinjie Ruan <ruanjinjie at huawei.com>
Link: https://lore.kernel.org/r/20260918161407.2300-12-will@kernel.org
---
arch/arm64/include/asm/percpu.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/percpu.h b/arch/arm64/include/asm/percpu.h
index 3cc316091d665..105f659bf8061 100644
--- a/arch/arm64/include/asm/percpu.h
+++ b/arch/arm64/include/asm/percpu.h
@@ -37,7 +37,7 @@ static inline unsigned long __hyp_my_cpu_offset(void)
"mrs " dst ", tpidr_el2", \
ARM64_HAS_VIRT_HOST_EXTN)
-static inline unsigned long __kern_my_cpu_offset(void)
+static __always_inline unsigned long __kern_my_cpu_offset(void)
{
unsigned long off;
--
2.39.5 (Apple Git-154)
More information about the linux-arm-kernel
mailing list