[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141118145228.GN18842@arm.com>
Date: Tue, 18 Nov 2014 14:52:29 +0000
From: Will Deacon <will.deacon@....com>
To: David Long <dave.long@...aro.org>
Cc: "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Russell King <linux@....linux.org.uk>,
Sandeepa Prabhu <sandeepa.prabhu@...aro.org>,
William Cohen <wcohen@...hat.com>,
Catalin Marinas <Catalin.Marinas@....com>,
"Jon Medhurst (Tixy)" <tixy@...aro.org>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 5/5] arm64: Add HAVE_REGS_AND_STACK_ACCESS_API feature
Hi David,
On Tue, Nov 18, 2014 at 06:32:55AM +0000, David Long wrote:
> From: "David A. Long" <dave.long@...aro.org>
>
> Add HAVE_REGS_AND_STACK_ACCESS_API feature for arm64.
[...]
> diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h
> index d3e782a..24cc048 100644
> --- a/arch/arm64/include/asm/ptrace.h
> +++ b/arch/arm64/include/asm/ptrace.h
> @@ -111,6 +111,8 @@ struct pt_regs {
> u64 syscallno;
> };
>
> +#define MAX_REG_OFFSET (offsetof(struct pt_regs, orig_x0))
Is orig_x0 actually useful to this API? If not, we could instead operate on
the user_pt_regs structure, and define the maximum offset in terms of sizeof
that.
> +#define ARM_cpsr pstate
> +#define ARM_pc pc
> +#define ARM_sp sp
> +#define ARM_lr regs[30]
> +#define ARM_fp regs[29]
> +#define ARM_x28 regs[28]
> +#define ARM_x27 regs[27]
[...]
I don't think we need these #defines.
Will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists