Re: [PATCH v2 11/21] arm64: percpu: Annotate __kern_my_cpu_offset() as '__always_inline'

From: Jinjie Ruan

Date: Thu Oct 08 2026 - 04:17:29 EST




在 2026/9/19 0:13, Will Deacon 写道:
> 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@xxxxxxxxxx>
> ---
> 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 3dc7291b16e9..cb9ae8a1ae87 100644
> --- a/arch/arm64/include/asm/percpu.h
> +++ b/arch/arm64/include/asm/percpu.h
> @@ -21,7 +21,7 @@ static inline unsigned long __hyp_my_cpu_offset(void)
> return read_sysreg(tpidr_el2);
> }
>
> -static inline unsigned long __kern_my_cpu_offset(void)
> +static __always_inline unsigned long __kern_my_cpu_offset(void)

Reviewed-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>

> {
> unsigned long off;
>

--
Best regards,
Jinjie