Re: [PATCH v3 26/29] nios2: ptrace support

From: Tobias Klauser
Date: Tue Sep 16 2014 - 05:43:32 EST


On 2014-09-08 at 11:22:37 +0200, Ley Foon Tan <lftan@xxxxxxxxxx> wrote:
> Add ptrace support for nios2.
>
> Signed-off-by: Ley Foon Tan <lftan@xxxxxxxxxx>
> ---
> arch/nios2/include/asm/ptrace.h | 33 +++++++
> arch/nios2/include/uapi/asm/ptrace.h | 120 ++++++++++++++++++++++++
> arch/nios2/kernel/ptrace.c | 176 +++++++++++++++++++++++++++++++++++
> 3 files changed, 329 insertions(+)
> create mode 100644 arch/nios2/include/asm/ptrace.h
> create mode 100644 arch/nios2/include/uapi/asm/ptrace.h
> create mode 100644 arch/nios2/kernel/ptrace.c
[...]
> diff --git a/arch/nios2/kernel/ptrace.c b/arch/nios2/kernel/ptrace.c
> new file mode 100644
> index 0000000..bcbf748
> --- /dev/null
> +++ b/arch/nios2/kernel/ptrace.c
[...]
> +long arch_ptrace(struct task_struct *child, long request, unsigned long addr,
> + unsigned long data)
> +{
> + int ret = -EIO;
> +
> + pr_debug("REQ=%ld: ADDR =0x%lx, DATA=0x%lx)\n", request, addr, data);
> +
> + switch (request) {
> + default:
> + ret = ptrace_request(child, request, addr, data);
> + break;
> + }
> +
> + return ret;
> +}

This could be simplified to:

long arch_ptrace(struct task_struct *child, long request, unsigned long addr,
unsigned long data)
{
return ptrace_request(child, request, addr, data);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/