Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751738AbbFREAT (ORCPT ); Thu, 18 Jun 2015 00:00:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39244 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752292AbbFRD7p (ORCPT ); Wed, 17 Jun 2015 23:59:45 -0400 From: Pratyush Anand To: linux-arm-kernel@lists.infradead.org, linux@arm.linux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com Cc: linux-kernel@vger.kernel.org, wcohen@redhat.com, oleg@redhat.com, dave.long@linaro.org, steve.capper@linaro.org, srikar@linux.vnet.ibm.com, vijaya.kumar@caviumnetworks.com, Pratyush Anand Subject: [RFC PATCH V2 04/10] arm64: Add helper for link pointer Date: Thu, 18 Jun 2015 09:28:51 +0530 Message-Id: <9b12762abf045a08c930f71537edf1affcca0c5c.1434598237.git.panand@redhat.com> In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1077 Lines: 34 At many a place we program procedure link pointer ie regs[30]. So adding helper to do that. Signed-off-by: Pratyush Anand --- arch/arm64/include/asm/ptrace.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h index 3ea7f5a04bfc..fa2c122e5bd6 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h @@ -227,6 +227,13 @@ static inline int valid_user_regs(struct user_pt_regs *regs) #include #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 -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/