[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150325134410.GA26903@localhost>
Date: Wed, 25 Mar 2015 13:44:10 +0000
From: Catalin Marinas <catalin.marinas@....com>
To: David Long <dave.long@...aro.org>
Cc: linux-arm-kernel@...ts.infradead.org,
Russell King <linux@....linux.org.uk>,
"Jon Medhurst (Tixy)" <tixy@...aro.org>,
Steve Capper <steve.capper@...aro.org>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Sandeepa Prabhu <sandeepa.prabhu@...aro.org>,
Will Deacon <will.deacon@....com>,
linux-kernel@...r.kernel.org,
Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
William Cohen <wcohen@...hat.com>, davem@...emloft.net
Subject: Re: [PATCH v5 1/6] arm64: Add HAVE_REGS_AND_STACK_ACCESS_API feature
On Tue, Feb 17, 2015 at 06:11:36PM -0500, David Long wrote:
> diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h
> index 6913643..700d28b 100644
> --- a/arch/arm64/include/uapi/asm/ptrace.h
> +++ b/arch/arm64/include/uapi/asm/ptrace.h
> @@ -61,6 +61,42 @@
>
> #ifndef __ASSEMBLY__
>
> +#define ARM_cpsr pstate
There is no CPSR on AArch64, it's just called PSTATE. But more
importantly, what's the point of all these macros?
> diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c
> index d882b83..adc1f39 100644
> --- a/arch/arm64/kernel/ptrace.c
> +++ b/arch/arm64/kernel/ptrace.c
> @@ -48,6 +48,122 @@
> #define CREATE_TRACE_POINTS
> #include <trace/events/syscalls.h>
>
> +struct pt_regs_offset {
> + const char *name;
> + int offset;
> +};
> +
> +#define REG_OFFSET_NAME(r) \
> + {.name = #r, .offset = offsetof(struct pt_regs, ARM_##r)}
> +#define REG_OFFSET_END {.name = NULL, .offset = 0}
> +
> +static const struct pt_regs_offset regoffset_table[] = {
> + REG_OFFSET_NAME(x0),
If it is just for defining a name, just change the REG_OFFSET_NAME macro
to take a string argument and remove all the ARM_ macros.
I'm also not sure why we need the ARM_ prefix. Do you see them used
outside the arm64 context?
--
Catalin
--
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