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

Jinjie Ruan ruanjinjie at huawei.com
Thu Oct 8 01:14:06 PDT 2026



在 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 at 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 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 at huawei.com>

>  {
>  	unsigned long off;
>  

-- 
Best regards,
Jinjie




More information about the linux-arm-kernel mailing list