aboutsummaryrefslogtreecommitdiff
path: root/arch/csky/include
diff options
context:
space:
mode:
authorTong Tiangen <[email protected]>2022-10-22 01:43:40 +0000
committerGuo Ren <[email protected]>2022-10-21 23:52:29 -0400
commitb203c67ebe752c8f2a2babf5e58d244c82680922 (patch)
treeef2e931ce17801419dcef1d083779be3e23c4829 /arch/csky/include
parent9abf2313adc1ca1b6180c508c25f22f9395cc780 (diff)
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/[email protected]/ Signed-off-by: Tong Tiangen <[email protected]> Signed-off-by: Guo Ren <[email protected]>
Diffstat (limited to 'arch/csky/include')
-rw-r--r--arch/csky/include/asm/processor.h2
1 files changed, 2 insertions, 0 deletions
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 */