Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (C) 2012 ARM Ltd.
0004  */
0005 #ifndef __ASM_SIGNAL32_H
0006 #define __ASM_SIGNAL32_H
0007 
0008 #ifdef CONFIG_COMPAT
0009 #include <linux/compat.h>
0010 
0011 struct compat_sigcontext {
0012     /* We always set these two fields to 0 */
0013     compat_ulong_t          trap_no;
0014     compat_ulong_t          error_code;
0015 
0016     compat_ulong_t          oldmask;
0017     compat_ulong_t          arm_r0;
0018     compat_ulong_t          arm_r1;
0019     compat_ulong_t          arm_r2;
0020     compat_ulong_t          arm_r3;
0021     compat_ulong_t          arm_r4;
0022     compat_ulong_t          arm_r5;
0023     compat_ulong_t          arm_r6;
0024     compat_ulong_t          arm_r7;
0025     compat_ulong_t          arm_r8;
0026     compat_ulong_t          arm_r9;
0027     compat_ulong_t          arm_r10;
0028     compat_ulong_t          arm_fp;
0029     compat_ulong_t          arm_ip;
0030     compat_ulong_t          arm_sp;
0031     compat_ulong_t          arm_lr;
0032     compat_ulong_t          arm_pc;
0033     compat_ulong_t          arm_cpsr;
0034     compat_ulong_t          fault_address;
0035 };
0036 
0037 struct compat_ucontext {
0038     compat_ulong_t          uc_flags;
0039     compat_uptr_t           uc_link;
0040     compat_stack_t          uc_stack;
0041     struct compat_sigcontext    uc_mcontext;
0042     compat_sigset_t         uc_sigmask;
0043     int                 __unused[32 - (sizeof(compat_sigset_t) / sizeof(int))];
0044     compat_ulong_t          uc_regspace[128] __attribute__((__aligned__(8)));
0045 };
0046 
0047 struct compat_sigframe {
0048     struct compat_ucontext  uc;
0049     compat_ulong_t      retcode[2];
0050 };
0051 
0052 struct compat_rt_sigframe {
0053     struct compat_siginfo info;
0054     struct compat_sigframe sig;
0055 };
0056 
0057 int compat_setup_frame(int usig, struct ksignal *ksig, sigset_t *set,
0058                struct pt_regs *regs);
0059 int compat_setup_rt_frame(int usig, struct ksignal *ksig, sigset_t *set,
0060               struct pt_regs *regs);
0061 
0062 void compat_setup_restart_syscall(struct pt_regs *regs);
0063 #else
0064 
0065 static inline int compat_setup_frame(int usid, struct ksignal *ksig,
0066                      sigset_t *set, struct pt_regs *regs)
0067 {
0068     return -ENOSYS;
0069 }
0070 
0071 static inline int compat_setup_rt_frame(int usig, struct ksignal *ksig, sigset_t *set,
0072                     struct pt_regs *regs)
0073 {
0074     return -ENOSYS;
0075 }
0076 
0077 static inline void compat_setup_restart_syscall(struct pt_regs *regs)
0078 {
0079 }
0080 #endif /* CONFIG_COMPAT */
0081 #endif /* __ASM_SIGNAL32_H */