David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 1 | /* |
| 2 | * This file is subject to the terms and conditions of the GNU General Public |
| 3 | * License. See the file "COPYING" in the main directory of this archive |
| 4 | * for more details. |
| 5 | * |
| 6 | * Copyright (C) 1998, 1999, 2001, 2003 Ralf Baechle |
| 7 | * Copyright (C) 2000, 2001 Silicon Graphics, Inc. |
| 8 | */ |
| 9 | #ifndef _UAPI_ASM_SIGINFO_H |
| 10 | #define _UAPI_ASM_SIGINFO_H |
| 11 | |
| 12 | |
| 13 | #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(long) + 2*sizeof(int)) |
Ralf Baechle | 7034228 | 2013-01-22 12:59:30 +0100 | [diff] [blame] | 14 | #undef __ARCH_SI_TRAPNO /* exception code needs to fill this ... */ |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 15 | |
| 16 | #define HAVE_ARCH_SIGINFO_T |
| 17 | |
| 18 | /* |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 19 | * Careful to keep union _sifields from shifting ... |
| 20 | */ |
Maciej W. Rozycki | 1d3e2d7 | 2013-07-28 21:20:25 +0100 | [diff] [blame] | 21 | #if _MIPS_SZLONG == 32 |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 22 | #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) |
Maciej W. Rozycki | 1d3e2d7 | 2013-07-28 21:20:25 +0100 | [diff] [blame] | 23 | #elif _MIPS_SZLONG == 64 |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 24 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) |
Maciej W. Rozycki | 1d3e2d7 | 2013-07-28 21:20:25 +0100 | [diff] [blame] | 25 | #else |
| 26 | #error _MIPS_SZLONG neither 32 nor 64 |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 27 | #endif |
| 28 | |
Ralf Baechle | 51d139b | 2012-07-12 17:13:15 +0200 | [diff] [blame] | 29 | #define __ARCH_SIGSYS |
| 30 | |
Petr Malat | 8cb48fe1 | 2014-12-12 15:28:01 +0100 | [diff] [blame] | 31 | #include <uapi/asm-generic/siginfo.h> |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 32 | |
Petr Malat | 8cb48fe1 | 2014-12-12 15:28:01 +0100 | [diff] [blame] | 33 | /* We can't use generic siginfo_t, because our si_code and si_errno are swapped */ |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 34 | typedef struct siginfo { |
| 35 | int si_signo; |
| 36 | int si_code; |
| 37 | int si_errno; |
| 38 | int __pad0[SI_MAX_SIZE / sizeof(int) - SI_PAD_SIZE - 3]; |
| 39 | |
| 40 | union { |
| 41 | int _pad[SI_PAD_SIZE]; |
| 42 | |
| 43 | /* kill() */ |
| 44 | struct { |
James Hogan | 5daebc4 | 2016-02-08 18:43:49 +0000 | [diff] [blame^] | 45 | __kernel_pid_t _pid; /* sender's pid */ |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 46 | __ARCH_SI_UID_T _uid; /* sender's uid */ |
| 47 | } _kill; |
| 48 | |
| 49 | /* POSIX.1b timers */ |
| 50 | struct { |
James Hogan | 5daebc4 | 2016-02-08 18:43:49 +0000 | [diff] [blame^] | 51 | __kernel_timer_t _tid; /* timer id */ |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 52 | int _overrun; /* overrun count */ |
| 53 | char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)]; |
| 54 | sigval_t _sigval; /* same as below */ |
Ralf Baechle | 7034228 | 2013-01-22 12:59:30 +0100 | [diff] [blame] | 55 | int _sys_private; /* not to be passed to user */ |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 56 | } _timer; |
| 57 | |
| 58 | /* POSIX.1b signals */ |
| 59 | struct { |
James Hogan | 5daebc4 | 2016-02-08 18:43:49 +0000 | [diff] [blame^] | 60 | __kernel_pid_t _pid; /* sender's pid */ |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 61 | __ARCH_SI_UID_T _uid; /* sender's uid */ |
| 62 | sigval_t _sigval; |
| 63 | } _rt; |
| 64 | |
| 65 | /* SIGCHLD */ |
| 66 | struct { |
James Hogan | 5daebc4 | 2016-02-08 18:43:49 +0000 | [diff] [blame^] | 67 | __kernel_pid_t _pid; /* which child */ |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 68 | __ARCH_SI_UID_T _uid; /* sender's uid */ |
| 69 | int _status; /* exit code */ |
James Hogan | 5daebc4 | 2016-02-08 18:43:49 +0000 | [diff] [blame^] | 70 | __kernel_clock_t _utime; |
| 71 | __kernel_clock_t _stime; |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 72 | } _sigchld; |
| 73 | |
| 74 | /* IRIX SIGCHLD */ |
| 75 | struct { |
James Hogan | 5daebc4 | 2016-02-08 18:43:49 +0000 | [diff] [blame^] | 76 | __kernel_pid_t _pid; /* which child */ |
| 77 | __kernel_clock_t _utime; |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 78 | int _status; /* exit code */ |
James Hogan | 5daebc4 | 2016-02-08 18:43:49 +0000 | [diff] [blame^] | 79 | __kernel_clock_t _stime; |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 80 | } _irix_sigchld; |
| 81 | |
| 82 | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ |
| 83 | struct { |
| 84 | void __user *_addr; /* faulting insn/memory ref. */ |
| 85 | #ifdef __ARCH_SI_TRAPNO |
| 86 | int _trapno; /* TRAP # which caused the signal */ |
| 87 | #endif |
| 88 | short _addr_lsb; |
Dave Hansen | b376cd0 | 2016-02-17 10:17:03 -0800 | [diff] [blame] | 89 | union { |
| 90 | /* used when si_code=SEGV_BNDERR */ |
| 91 | struct { |
| 92 | void __user *_lower; |
| 93 | void __user *_upper; |
| 94 | } _addr_bnd; |
| 95 | /* used when si_code=SEGV_PKUERR */ |
Dave Hansen | 49cd53b | 2016-03-01 04:54:51 -0800 | [diff] [blame] | 96 | __u32 _pkey; |
Dave Hansen | b376cd0 | 2016-02-17 10:17:03 -0800 | [diff] [blame] | 97 | }; |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 98 | } _sigfault; |
| 99 | |
Ralf Baechle | 7034228 | 2013-01-22 12:59:30 +0100 | [diff] [blame] | 100 | /* SIGPOLL, SIGXFSZ (To do ...) */ |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 101 | struct { |
Ralf Baechle | 7034228 | 2013-01-22 12:59:30 +0100 | [diff] [blame] | 102 | __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */ |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 103 | int _fd; |
| 104 | } _sigpoll; |
Ralf Baechle | 51d139b | 2012-07-12 17:13:15 +0200 | [diff] [blame] | 105 | |
| 106 | /* SIGSYS */ |
| 107 | struct { |
| 108 | void __user *_call_addr; /* calling user insn */ |
| 109 | int _syscall; /* triggering system call number */ |
| 110 | unsigned int _arch; /* AUDIT_ARCH_* of syscall */ |
| 111 | } _sigsys; |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 112 | } _sifields; |
| 113 | } siginfo_t; |
| 114 | |
| 115 | /* |
| 116 | * si_code values |
| 117 | * Again these have been chosen to be IRIX compatible. |
| 118 | */ |
| 119 | #undef SI_ASYNCIO |
| 120 | #undef SI_TIMER |
| 121 | #undef SI_MESGQ |
| 122 | #define SI_ASYNCIO -2 /* sent by AIO completion */ |
| 123 | #define SI_TIMER __SI_CODE(__SI_TIMER, -3) /* sent by timer expiration */ |
| 124 | #define SI_MESGQ __SI_CODE(__SI_MESGQ, -4) /* sent by real time mesq state change */ |
| 125 | |
Petr Malat | 8cb48fe1 | 2014-12-12 15:28:01 +0100 | [diff] [blame] | 126 | #include <asm-generic/siginfo.h> |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 127 | |
| 128 | #endif /* _UAPI_ASM_SIGINFO_H */ |