2019-05-27 09:55:01 +03:00
/* SPDX-License-Identifier: GPL-2.0-or-later */
2005-04-17 02:20:36 +04:00
# ifndef _PPC64_PPC32_H
# define _PPC64_PPC32_H
# include <linux/compat.h>
# include <asm/siginfo.h>
# include <asm/signal.h>
/*
* Data types and macros for providing 32 b PowerPC support .
*/
/* These are here to support 32-bit syscalls on a 64-bit kernel. */
2005-11-03 07:14:36 +03:00
struct pt_regs32 {
unsigned int gpr [ 32 ] ;
unsigned int nip ;
unsigned int msr ;
unsigned int orig_gpr3 ; /* Used for restarting system calls */
unsigned int ctr ;
unsigned int link ;
unsigned int xer ;
unsigned int ccr ;
unsigned int mq ; /* 601 only (not used at present) */
unsigned int trap ; /* Reason for being here */
unsigned int dar ; /* Fault registers */
unsigned int dsisr ;
unsigned int result ; /* Result of a system call */
} ;
2005-04-17 02:20:36 +04:00
struct sigcontext32 {
unsigned int _unused [ 4 ] ;
int signal ;
2005-10-18 05:17:58 +04:00
compat_uptr_t handler ;
2005-04-17 02:20:36 +04:00
unsigned int oldmask ;
2005-10-18 05:17:58 +04:00
compat_uptr_t regs ; /* 4 byte pointer to the pt_regs32 structure. */
2005-04-17 02:20:36 +04:00
} ;
struct mcontext32 {
elf_gregset_t32 mc_gregs ;
elf_fpregset_t mc_fregs ;
unsigned int mc_pad [ 2 ] ;
elf_vrregset_t32 mc_vregs __attribute__ ( ( __aligned__ ( 16 ) ) ) ;
2008-06-25 08:07:18 +04:00
elf_vsrreghalf_t32 mc_vsregs __attribute__ ( ( __aligned__ ( 16 ) ) ) ;
2005-04-17 02:20:36 +04:00
} ;
struct ucontext32 {
unsigned int uc_flags ;
unsigned int uc_link ;
2012-12-23 12:26:46 +04:00
compat_stack_t uc_stack ;
2005-04-17 02:20:36 +04:00
int uc_pad [ 7 ] ;
2005-10-18 05:17:58 +04:00
compat_uptr_t uc_regs ; /* points to uc_mcontext field */
2005-04-17 02:20:36 +04:00
compat_sigset_t uc_sigmask ; /* mask last for extensibility */
/* glibc has 1024-bit signal masks, ours are 64-bit */
int uc_maskext [ 30 ] ;
int uc_pad2 [ 3 ] ;
struct mcontext32 uc_mcontext ;
} ;
# endif /* _PPC64_PPC32_H */