aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPratyush Anand <panand@redhat.com>2015-01-05 09:55:52 +0530
committerSteven Capper <steve.capper@linaro.org>2015-04-07 12:58:38 +0100
commitf3f97350d6c13bd286ec6604147d980ff19fb5c5 (patch)
treeffe7da06df13eae678ab0261350b050862a6111e
parent18b2db25d83c19327fb9a7174f6ef20741ba49ad (diff)
downloadlinux-f3f97350d6c13bd286ec6604147d980ff19fb5c5.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> Signed-off-by: Steve Capper <steve.capper@linaro.org>
-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 bf326e33ae5..86bce25be4d 100644
--- a/arch/arm64/include/asm/ptrace.h
+++ b/arch/arm64/include/asm/ptrace.h
@@ -232,6 +232,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