summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/ptrace/ptrace-decl.h
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2020-02-28 01:14:41 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2020-04-01 05:30:48 +0200
commit7b99ed4e8e3acd8eb9a8bcc71b9b9273a573bdbf (patch)
tree4d68d5c7887504a7f8ff08e1f101cece60dae9f7 /arch/powerpc/kernel/ptrace/ptrace-decl.h
parentpowerpc/ptrace: drop PARAMETER_SAVE_AREA_OFFSET (diff)
downloadlinux-7b99ed4e8e3acd8eb9a8bcc71b9b9273a573bdbf.tar.xz
linux-7b99ed4e8e3acd8eb9a8bcc71b9b9273a573bdbf.zip
powerpc/ptrace: split out VSX related functions.
Move CONFIG_VSX functions out of ptrace.c, into ptrace-vsx.c and ptrace-novsx.c Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/dc8e20c8c95b7e83add0c6dd48f9470628896c5c.1582848567.git.christophe.leroy@c-s.fr
Diffstat (limited to 'arch/powerpc/kernel/ptrace/ptrace-decl.h')
-rw-r--r--arch/powerpc/kernel/ptrace/ptrace-decl.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/ptrace/ptrace-decl.h b/arch/powerpc/kernel/ptrace/ptrace-decl.h
new file mode 100644
index 000000000000..764df4ee9362
--- /dev/null
+++ b/arch/powerpc/kernel/ptrace/ptrace-decl.h
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+/* ptrace-(no)vsx */
+
+int fpr_get(struct task_struct *target, const struct user_regset *regset,
+ unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf);
+int fpr_set(struct task_struct *target, const struct user_regset *regset,
+ unsigned int pos, unsigned int count,
+ const void *kbuf, const void __user *ubuf);
+
+/* ptrace-vsx */
+
+int vsr_active(struct task_struct *target, const struct user_regset *regset);
+int vsr_get(struct task_struct *target, const struct user_regset *regset,
+ unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf);
+int vsr_set(struct task_struct *target, const struct user_regset *regset,
+ unsigned int pos, unsigned int count,
+ const void *kbuf, const void __user *ubuf);
+
+/* ptrace */
+
+#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
+void flush_tmregs_to_thread(struct task_struct *tsk);
+#else
+static inline void flush_tmregs_to_thread(struct task_struct *tsk) { }
+#endif