From b203c67ebe752c8f2a2babf5e58d244c82680922 Mon Sep 17 00:00:00 2001 From: Tong Tiangen Date: Sat, 22 Oct 2022 01:43:40 +0000 Subject: csky: add arch support current_stack_pointer To follow the existing per-arch conventions, using "current_stack_pointer" to set sp. This will let it be used in non-arch places(like HARDENED_USERCOPY). Refer to the implementation of riscv commit fdecfea09328 ("riscv: Rename "sp_in_global" to "current_stack_pointer""). Link: https://lore.kernel.org/lkml/20220224060411.1855683-1-keescook@chromium.org/ Signed-off-by: Tong Tiangen Signed-off-by: Guo Ren --- arch/csky/include/asm/processor.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/csky/include/asm/processor.h') diff --git a/arch/csky/include/asm/processor.h b/arch/csky/include/asm/processor.h index 63ad71fab30d..ea75d72dea86 100644 --- a/arch/csky/include/asm/processor.h +++ b/arch/csky/include/asm/processor.h @@ -84,4 +84,6 @@ unsigned long __get_wchan(struct task_struct *p); #define cpu_relax() barrier() +register unsigned long current_stack_pointer __asm__("sp"); + #endif /* __ASM_CSKY_PROCESSOR_H */ -- cgit v1.2.3