aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/ptrace.h
diff options
context:
space:
mode:
authorPratyush Anand <panand@redhat.com>2015-01-05 09:55:52 +0530
committerSteve Capper <steve.capper@linaro.org>2015-01-27 16:46:19 +0000
commitb9d90fc05342045e0192a0b2ce028c88dc53eec4 (patch)
tree26a44ae24081fb46446241726a5e091618c684d9 /arch/arm64/include/asm/ptrace.h
parenta9c74c15500ba2e663d4f9e09f7756bfa7f1c229 (diff)
downloadlinux-b9d90fc05342045e0192a0b2ce028c88dc53eec4.tar.gz
ARM64: Add helper for link pointer
At many a place we program procedure link pointer ie regs[30]. So adding helper to do that. Signed-off-by: Pratyush Anand <panand@redhat.com>
Diffstat (limited to 'arch/arm64/include/asm/ptrace.h')
-rw-r--r--arch/arm64/include/asm/ptrace.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h
index b5d4f92ae2a..fa40903264a 100644
--- a/arch/arm64/include/asm/ptrace.h
+++ b/arch/arm64/include/asm/ptrace.h
@@ -224,6 +224,13 @@ static inline int valid_user_regs(struct user_pt_regs *regs)
#include <asm-generic/ptrace.h>
#define stack_pointer(regs) ((regs)->sp)
+#define procedure_link_pointer(regs) ((regs)->regs[30])
+
+static inline void procedure_link_pointer_set(struct pt_regs *regs,
+ unsigned long val)
+{
+ procedure_link_pointer(regs) = val;
+}
#ifdef CONFIG_SMP
#undef profile_pc