powerpc/ptrace: Move declaration of ptrace_get_reg() and ptrace_set_reg()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 18 Aug 2020 17:19:14 +0000 (17:19 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 3 Dec 2020 14:01:11 +0000 (01:01 +1100)
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: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/376c258267aeae54a4423bc4a2e107a9611f0039.1597770847.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/ptrace.h
arch/powerpc/kernel/ptrace/ptrace-decl.h
arch/powerpc/kernel/ptrace/ptrace32.c

index e2c778c176a3a6a49577e2854437945d6c8b0f3b..297d30fed945ac94399b7838e0d7e39637b75249 100644 (file)
@@ -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)
 
index 67447a6197ebe0f565635324ae738835f8508b74..2ddc68412fa8c045cd6e382d73af299d3126de33 100644 (file)
@@ -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 */
index 7589a9665ffb3a9e2ef932e81f8240b34f2211a9..d30b9ad70edc28253ba5c3e75fb12ff4ce3e7048 100644 (file)
@@ -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.