4 #include <linux/compat.h>
5 #include <asm/siginfo.h>
6 #include <asm/signal.h>
9 * Data types and macros for providing 32b PowerPC support.
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version
14 * 2 of the License, or (at your option) any later version.
17 /* These are here to support 32-bit syscalls on a 64-bit kernel. */
19 typedef struct compat_siginfo
{
25 int _pad
[SI_PAD_SIZE32
];
29 compat_pid_t _pid
; /* sender's pid */
30 compat_uid_t _uid
; /* sender's uid */
35 compat_timer_t _tid
; /* timer id */
36 int _overrun
; /* overrun count */
37 compat_sigval_t _sigval
; /* same as below */
38 int _sys_private
; /* not to be passed to user */
41 /* POSIX.1b signals */
43 compat_pid_t _pid
; /* sender's pid */
44 compat_uid_t _uid
; /* sender's uid */
45 compat_sigval_t _sigval
;
50 compat_pid_t _pid
; /* which child */
51 compat_uid_t _uid
; /* sender's uid */
52 int _status
; /* exit code */
53 compat_clock_t _utime
;
54 compat_clock_t _stime
;
57 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGEMT */
59 unsigned int _addr
; /* faulting insn/memory ref. */
64 int _band
; /* POLL_IN, POLL_OUT, POLL_MSG */
70 #define __old_sigaction32 old_sigaction32
72 struct __old_sigaction32
{
73 compat_uptr_t sa_handler
;
74 compat_old_sigset_t sa_mask
;
75 unsigned int sa_flags
;
76 compat_uptr_t sa_restorer
; /* not used by Linux/SPARC yet */
82 compat_uptr_t sa_handler
; /* Really a pointer, but need to deal with 32 bits */
83 unsigned int sa_flags
;
84 compat_uptr_t sa_restorer
; /* Another 32 bit pointer */
85 compat_sigset_t sa_mask
; /* A 32 bit mask */
88 typedef struct sigaltstack_32
{
91 compat_size_t ss_size
;
98 unsigned int orig_gpr3
; /* Used for restarting system calls */
103 unsigned int mq
; /* 601 only (not used at present) */
104 unsigned int trap
; /* Reason for being here */
105 unsigned int dar
; /* Fault registers */
107 unsigned int result
; /* Result of a system call */
110 struct sigcontext32
{
111 unsigned int _unused
[4];
113 compat_uptr_t handler
;
114 unsigned int oldmask
;
115 compat_uptr_t regs
; /* 4 byte pointer to the pt_regs32 structure. */
119 elf_gregset_t32 mc_gregs
;
120 elf_fpregset_t mc_fregs
;
121 unsigned int mc_pad
[2];
122 elf_vrregset_t32 mc_vregs
__attribute__((__aligned__(16)));
123 elf_vsrreghalf_t32 mc_vsregs
__attribute__((__aligned__(16)));
127 unsigned int uc_flags
;
128 unsigned int uc_link
;
131 compat_uptr_t uc_regs
; /* points to uc_mcontext field */
132 compat_sigset_t uc_sigmask
; /* mask last for extensibility */
133 /* glibc has 1024-bit signal masks, ours are 64-bit */
136 struct mcontext32 uc_mcontext
;
139 #endif /* _PPC64_PPC32_H */