Commit 67e364b3 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman
Browse files

powerpc/ptrace: Move declaration of ptrace_get_reg() and ptrace_set_reg()



ptrace_get_reg() and ptrace_set_reg() are only used internally by
ptrace.

Move them in arch/powerpc/kernel/ptrace/ptrace-decl.h

Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/376c258267aeae54a4423bc4a2e107a9611f0039.1597770847.git.christophe.leroy@csgroup.eu
parent 95593e93
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -171,12 +171,6 @@ static inline void regs_set_return_value(struct pt_regs *regs, unsigned long rc)
		set_thread_flag(TIF_NOERROR); \
	} while(0)

struct task_struct;
extern int ptrace_get_reg(struct task_struct *task, int regno,
			  unsigned long *data);
extern int ptrace_put_reg(struct task_struct *task, int regno,
			  unsigned long data);

#define current_pt_regs() \
	((struct pt_regs *)((unsigned long)task_stack_page(current) + THREAD_SIZE) - 1)

+3 −0
Original line number Diff line number Diff line
@@ -159,6 +159,9 @@ int tm_cgpr32_set(struct task_struct *target, const struct user_regset *regset,

/* ptrace-view */

int ptrace_get_reg(struct task_struct *task, int regno, unsigned long *data);
int ptrace_put_reg(struct task_struct *task, int regno, unsigned long data);

extern const struct user_regset_view user_ppc_native_view;

/* ptrace-(no)adv */
+2 −0
Original line number Diff line number Diff line
@@ -23,6 +23,8 @@

#include <asm/switch_to.h>

#include "ptrace-decl.h"

/*
 * does not yet catch signals sent when the child dies.
 * in exit.c or in signal.c.