2 * Copyright (C) 2012 ARM Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #ifndef __ASM_SIGNAL32_H
17 #define __ASM_SIGNAL32_H
21 #include <linux/compat.h>
23 struct compat_sigcontext
{
24 /* We always set these two fields to 0 */
25 compat_ulong_t trap_no
;
26 compat_ulong_t error_code
;
28 compat_ulong_t oldmask
;
29 compat_ulong_t arm_r0
;
30 compat_ulong_t arm_r1
;
31 compat_ulong_t arm_r2
;
32 compat_ulong_t arm_r3
;
33 compat_ulong_t arm_r4
;
34 compat_ulong_t arm_r5
;
35 compat_ulong_t arm_r6
;
36 compat_ulong_t arm_r7
;
37 compat_ulong_t arm_r8
;
38 compat_ulong_t arm_r9
;
39 compat_ulong_t arm_r10
;
40 compat_ulong_t arm_fp
;
41 compat_ulong_t arm_ip
;
42 compat_ulong_t arm_sp
;
43 compat_ulong_t arm_lr
;
44 compat_ulong_t arm_pc
;
45 compat_ulong_t arm_cpsr
;
46 compat_ulong_t fault_address
;
49 struct compat_ucontext
{
50 compat_ulong_t uc_flags
;
51 compat_uptr_t uc_link
;
52 compat_stack_t uc_stack
;
53 struct compat_sigcontext uc_mcontext
;
54 compat_sigset_t uc_sigmask
;
55 int __unused
[32 - (sizeof(compat_sigset_t
) / sizeof(int))];
56 compat_ulong_t uc_regspace
[128] __aligned(8);
59 struct compat_sigframe
{
60 struct compat_ucontext uc
;
61 compat_ulong_t retcode
[2];
64 struct compat_rt_sigframe
{
65 struct compat_siginfo info
;
66 struct compat_sigframe sig
;
69 int compat_setup_frame(int usig
, struct ksignal
*ksig
, sigset_t
*set
,
70 struct pt_regs
*regs
);
71 int compat_setup_rt_frame(int usig
, struct ksignal
*ksig
, sigset_t
*set
,
72 struct pt_regs
*regs
);
74 void compat_setup_restart_syscall(struct pt_regs
*regs
);
77 static inline int compat_setup_frame(int usid
, struct ksignal
*ksig
,
78 sigset_t
*set
, struct pt_regs
*regs
)
83 static inline int compat_setup_rt_frame(int usig
, struct ksignal
*ksig
, sigset_t
*set
,
89 static inline void compat_setup_restart_syscall(struct pt_regs
*regs
)
92 #endif /* CONFIG_COMPAT */
93 #endif /* __KERNEL__ */
94 #endif /* __ASM_SIGNAL32_H */