1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2012 ARM Ltd.
5 #ifndef __ASM_SIGNAL32_H
6 #define __ASM_SIGNAL32_H
10 #include <linux/compat.h>
12 struct compat_sigcontext {
13 /* We always set these two fields to 0 */
14 compat_ulong_t trap_no;
15 compat_ulong_t error_code;
17 compat_ulong_t oldmask;
18 compat_ulong_t arm_r0;
19 compat_ulong_t arm_r1;
20 compat_ulong_t arm_r2;
21 compat_ulong_t arm_r3;
22 compat_ulong_t arm_r4;
23 compat_ulong_t arm_r5;
24 compat_ulong_t arm_r6;
25 compat_ulong_t arm_r7;
26 compat_ulong_t arm_r8;
27 compat_ulong_t arm_r9;
28 compat_ulong_t arm_r10;
29 compat_ulong_t arm_fp;
30 compat_ulong_t arm_ip;
31 compat_ulong_t arm_sp;
32 compat_ulong_t arm_lr;
33 compat_ulong_t arm_pc;
34 compat_ulong_t arm_cpsr;
35 compat_ulong_t fault_address;
38 struct compat_ucontext {
39 compat_ulong_t uc_flags;
40 compat_uptr_t uc_link;
41 compat_stack_t uc_stack;
42 struct compat_sigcontext uc_mcontext;
43 compat_sigset_t uc_sigmask;
44 int __unused[32 - (sizeof(compat_sigset_t) / sizeof(int))];
45 compat_ulong_t uc_regspace[128] __attribute__((__aligned__(8)));
48 struct compat_sigframe {
49 struct compat_ucontext uc;
50 compat_ulong_t retcode[2];
53 struct compat_rt_sigframe {
54 struct compat_siginfo info;
55 struct compat_sigframe sig;
58 int compat_setup_frame(int usig, struct ksignal *ksig, sigset_t *set,
59 struct pt_regs *regs);
60 int compat_setup_rt_frame(int usig, struct ksignal *ksig, sigset_t *set,
61 struct pt_regs *regs);
63 void compat_setup_restart_syscall(struct pt_regs *regs);
66 static inline int compat_setup_frame(int usid, struct ksignal *ksig,
67 sigset_t *set, struct pt_regs *regs)
72 static inline int compat_setup_rt_frame(int usig, struct ksignal *ksig, sigset_t *set,
78 static inline void compat_setup_restart_syscall(struct pt_regs *regs)
81 #endif /* CONFIG_COMPAT */
82 #endif /* __KERNEL__ */
83 #endif /* __ASM_SIGNAL32_H */