blob: 8004336858884b4229495875b406f1de5ae552bd [file] [log] [blame]
Benjamin Herrenschmidt22e38f22007-06-04 15:15:49 +10001/*
Adam Buchbinder446957b2016-02-24 10:51:11 -08002 * Copyright (c) 2007 Benjamin Herrenschmidt, IBM Corporation
Benjamin Herrenschmidt22e38f22007-06-04 15:15:49 +10003 * Extracted from signal_32.c and signal_64.c
4 *
5 * This file is subject to the terms and conditions of the GNU General
6 * Public License. See the file README.legal in the main directory of
7 * this archive for more details.
8 */
9
10#ifndef _POWERPC_ARCH_SIGNAL_H
11#define _POWERPC_ARCH_SIGNAL_H
12
Benjamin Herrenschmidt18b246f2012-02-22 16:48:32 +110013extern void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags);
Al Viro2e074002008-08-18 00:12:41 -040014
Richard Weinberger129b69d2014-03-02 14:46:11 +010015extern void __user *get_sigframe(struct ksignal *ksig, unsigned long sp,
Josh Boyerefbda862009-03-25 06:23:59 +000016 size_t frame_size, int is_32);
Christoph Hellwigf478f542007-06-04 15:15:52 +100017
Richard Weinberger129b69d2014-03-02 14:46:11 +010018extern int handle_signal32(struct ksignal *ksig, sigset_t *oldset,
Cyril Burd1199432016-09-23 16:18:12 +100019 struct task_struct *tsk);
Christoph Hellwigf478f542007-06-04 15:15:52 +100020
Richard Weinberger129b69d2014-03-02 14:46:11 +010021extern int handle_rt_signal32(struct ksignal *ksig, sigset_t *oldset,
Cyril Burd1199432016-09-23 16:18:12 +100022 struct task_struct *tsk);
Christoph Hellwigf478f542007-06-04 15:15:52 +100023
Michael Neuling6a274c02008-07-02 14:06:37 +100024extern unsigned long copy_fpr_to_user(void __user *to,
25 struct task_struct *task);
Cyril Bur000ec282016-09-23 16:18:25 +100026extern unsigned long copy_ckfpr_to_user(void __user *to,
Michael Neuling2b0a5762013-02-13 16:21:41 +000027 struct task_struct *task);
Michael Neuling6a274c02008-07-02 14:06:37 +100028extern unsigned long copy_fpr_from_user(struct task_struct *task,
29 void __user *from);
Cyril Bur000ec282016-09-23 16:18:25 +100030extern unsigned long copy_ckfpr_from_user(struct task_struct *task,
Michael Neuling2b0a5762013-02-13 16:21:41 +000031 void __user *from);
Cyril Burd1199432016-09-23 16:18:12 +100032extern unsigned long get_tm_stackpointer(struct task_struct *tsk);
33
Michael Neuling6a274c02008-07-02 14:06:37 +100034#ifdef CONFIG_VSX
35extern unsigned long copy_vsx_to_user(void __user *to,
36 struct task_struct *task);
Cyril Bur000ec282016-09-23 16:18:25 +100037extern unsigned long copy_ckvsx_to_user(void __user *to,
Michael Neuling2b0a5762013-02-13 16:21:41 +000038 struct task_struct *task);
Michael Neuling6a274c02008-07-02 14:06:37 +100039extern unsigned long copy_vsx_from_user(struct task_struct *task,
40 void __user *from);
Cyril Bur000ec282016-09-23 16:18:25 +100041extern unsigned long copy_ckvsx_from_user(struct task_struct *task,
Michael Neuling2b0a5762013-02-13 16:21:41 +000042 void __user *from);
Michael Neuling6a274c02008-07-02 14:06:37 +100043#endif
Benjamin Herrenschmidt2f97cd32007-06-04 15:15:56 +100044
45#ifdef CONFIG_PPC64
46
Richard Weinberger129b69d2014-03-02 14:46:11 +010047extern int handle_rt_signal64(struct ksignal *ksig, sigset_t *set,
Cyril Burd1199432016-09-23 16:18:12 +100048 struct task_struct *tsk);
Benjamin Herrenschmidt22e38f22007-06-04 15:15:49 +100049
Benjamin Herrenschmidt2f97cd32007-06-04 15:15:56 +100050#else /* CONFIG_PPC64 */
51
Al Virof3675642018-05-02 23:20:47 +100052extern long sys_rt_sigreturn(void);
53extern long sys_sigreturn(void);
Mathieu Malaterreb53875c2018-02-25 18:22:33 +010054
Richard Weinberger129b69d2014-03-02 14:46:11 +010055static inline int handle_rt_signal64(struct ksignal *ksig, sigset_t *set,
Cyril Burd1199432016-09-23 16:18:12 +100056 struct task_struct *tsk)
Benjamin Herrenschmidt2f97cd32007-06-04 15:15:56 +100057{
58 return -EFAULT;
59}
60
61#endif /* !defined(CONFIG_PPC64) */
62
Benjamin Herrenschmidt22e38f22007-06-04 15:15:49 +100063#endif /* _POWERPC_ARCH_SIGNAL_H */