lkml.org 
[lkml]   [2014]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 26/29] nios2: ptrace support
On 2014-09-08 at 11:22:37 +0200, Ley Foon Tan <lftan@altera.com> wrote:
> Add ptrace support for nios2.
>
> Signed-off-by: Ley Foon Tan <lftan@altera.com>
> ---
> 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);
}


\
 
 \ /
  Last update: 2014-09-16 12:21    [W:0.202 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site