From bd1912de892ce30e1e2242e67716d25188fbfa44 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Wed, 23 Feb 2022 22:05:58 -0800 Subject: alpha: Implement "current_stack_pointer" To follow the existing per-arch conventions replace open-coded use of asm "$30" as "current_stack_pointer". This will let it be used in non-arch places (like HARDENED_USERCOPY). Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Geert Uytterhoeven Cc: Andrew Morton Cc: Mike Rapoport Cc: Mark Rutland Cc: "Peter Zijlstra (Intel)" Cc: Kefeng Wang Cc: "Alexander A. Klimov" Cc: linux-alpha@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Matt Turner --- arch/alpha/include/asm/thread_info.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/alpha/include/asm') diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/asm/thread_info.h index 082631465074..354247dca161 100644 --- a/arch/alpha/include/asm/thread_info.h +++ b/arch/alpha/include/asm/thread_info.h @@ -41,6 +41,8 @@ struct thread_info { register struct thread_info *__current_thread_info __asm__("$8"); #define current_thread_info() __current_thread_info +register unsigned long *current_stack_pointer __asm__ ("$30"); + #endif /* __ASSEMBLY__ */ /* Thread information allocation. */ -- cgit v1.2.3-70-g09d2