2019-06-03 07:44:50 +02:00
/* SPDX-License-Identifier: GPL-2.0-only */
2012-03-05 11:49:32 +00:00
/*
* Copyright ( C ) 2012 ARM Ltd .
*/
# ifndef __ASM_SIGNAL32_H
# define __ASM_SIGNAL32_H
# ifdef CONFIG_COMPAT
# include <linux/compat.h>
2019-06-21 10:52:34 +01:00
struct compat_sigcontext {
/* We always set these two fields to 0 */
compat_ulong_t trap_no ;
compat_ulong_t error_code ;
compat_ulong_t oldmask ;
compat_ulong_t arm_r0 ;
compat_ulong_t arm_r1 ;
compat_ulong_t arm_r2 ;
compat_ulong_t arm_r3 ;
compat_ulong_t arm_r4 ;
compat_ulong_t arm_r5 ;
compat_ulong_t arm_r6 ;
compat_ulong_t arm_r7 ;
compat_ulong_t arm_r8 ;
compat_ulong_t arm_r9 ;
compat_ulong_t arm_r10 ;
compat_ulong_t arm_fp ;
compat_ulong_t arm_ip ;
compat_ulong_t arm_sp ;
compat_ulong_t arm_lr ;
compat_ulong_t arm_pc ;
compat_ulong_t arm_cpsr ;
compat_ulong_t fault_address ;
} ;
struct compat_ucontext {
compat_ulong_t uc_flags ;
compat_uptr_t uc_link ;
compat_stack_t uc_stack ;
struct compat_sigcontext uc_mcontext ;
compat_sigset_t uc_sigmask ;
int __unused [ 32 - ( sizeof ( compat_sigset_t ) / sizeof ( int ) ) ] ;
compat_ulong_t uc_regspace [ 128 ] __attribute__ ( ( __aligned__ ( 8 ) ) ) ;
} ;
struct compat_sigframe {
struct compat_ucontext uc ;
compat_ulong_t retcode [ 2 ] ;
} ;
struct compat_rt_sigframe {
struct compat_siginfo info ;
struct compat_sigframe sig ;
} ;
2013-10-06 22:52:44 +02:00
int compat_setup_frame ( int usig , struct ksignal * ksig , sigset_t * set ,
2012-03-05 11:49:32 +00:00
struct pt_regs * regs ) ;
2013-10-06 22:52:44 +02:00
int compat_setup_rt_frame ( int usig , struct ksignal * ksig , sigset_t * set ,
struct pt_regs * regs ) ;
2012-03-05 11:49:32 +00:00
void compat_setup_restart_syscall ( struct pt_regs * regs ) ;
# else
2013-10-06 22:52:44 +02:00
static inline int compat_setup_frame ( int usid , struct ksignal * ksig ,
2012-03-05 11:49:32 +00:00
sigset_t * set , struct pt_regs * regs )
{
return - ENOSYS ;
}
2013-10-06 22:52:44 +02:00
static inline int compat_setup_rt_frame ( int usig , struct ksignal * ksig , sigset_t * set ,
2012-03-05 11:49:32 +00:00
struct pt_regs * regs )
{
return - ENOSYS ;
}
static inline void compat_setup_restart_syscall ( struct pt_regs * regs )
{
}
# endif /* CONFIG_COMPAT */
# endif /* __ASM_SIGNAL32_H */