Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [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) 1996, 1997, 1999 by Ralf Baechle |
| 7 | * Copyright (C) 1999 Silicon Graphics, Inc. |
| 8 | */ |
| 9 | #ifndef _ASM_SIGCONTEXT_H |
| 10 | #define _ASM_SIGCONTEXT_H |
| 11 | |
| 12 | #include <asm/sgidefs.h> |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 13 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | #if _MIPS_SIM == _MIPS_SIM_ABI32 |
| 15 | |
| 16 | /* |
| 17 | * Keep this struct definition in sync with the sigcontext fragment |
| 18 | * in arch/mips/tools/offset.c |
| 19 | */ |
| 20 | struct sigcontext { |
| 21 | unsigned int sc_regmask; /* Unused */ |
Franck Bui-Huu | 6bfe966 | 2007-02-05 15:24:26 +0100 | [diff] [blame] | 22 | unsigned int sc_status; /* Unused */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | unsigned long long sc_pc; |
| 24 | unsigned long long sc_regs[32]; |
| 25 | unsigned long long sc_fpregs[32]; |
Franck Bui-Huu | 9693a85 | 2007-02-02 17:41:47 +0100 | [diff] [blame] | 26 | unsigned int sc_acx; /* Was sc_ownedfp */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | unsigned int sc_fpc_csr; |
| 28 | unsigned int sc_fpc_eir; /* Unused */ |
| 29 | unsigned int sc_used_math; |
Ralf Baechle | e50c0a8 | 2005-05-31 11:49:19 +0000 | [diff] [blame] | 30 | unsigned int sc_dsp; /* dsp status, was sc_ssflags */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | unsigned long long sc_mdhi; |
| 32 | unsigned long long sc_mdlo; |
Ralf Baechle | e50c0a8 | 2005-05-31 11:49:19 +0000 | [diff] [blame] | 33 | unsigned long sc_hi1; /* Was sc_cause */ |
| 34 | unsigned long sc_lo1; /* Was sc_badvaddr */ |
| 35 | unsigned long sc_hi2; /* Was sc_sigset[4] */ |
| 36 | unsigned long sc_lo2; |
| 37 | unsigned long sc_hi3; |
| 38 | unsigned long sc_lo3; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | }; |
| 40 | |
| 41 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 42 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 |
| 44 | |
Atsushi Nemoto | 269dd2b | 2007-02-18 00:12:57 +0900 | [diff] [blame] | 45 | #include <linux/posix_types.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | /* |
| 47 | * Keep this struct definition in sync with the sigcontext fragment |
| 48 | * in arch/mips/tools/offset.c |
| 49 | * |
| 50 | * Warning: this structure illdefined with sc_badvaddr being just an unsigned |
| 51 | * int so it was changed to unsigned long in 2.6.0-test1. This may break |
| 52 | * binary compatibility - no prisoners. |
Ralf Baechle | e50c0a8 | 2005-05-31 11:49:19 +0000 | [diff] [blame] | 53 | * DSP ASE in 2.6.12-rc4. Turn sc_mdhi and sc_mdlo into an array of four |
| 54 | * entries, add sc_dsp and sc_reserved for padding. No prisoners. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | */ |
| 56 | struct sigcontext { |
Atsushi Nemoto | 269dd2b | 2007-02-18 00:12:57 +0900 | [diff] [blame] | 57 | __u64 sc_regs[32]; |
| 58 | __u64 sc_fpregs[32]; |
| 59 | __u64 sc_mdhi; |
| 60 | __u64 sc_hi1; |
| 61 | __u64 sc_hi2; |
| 62 | __u64 sc_hi3; |
| 63 | __u64 sc_mdlo; |
| 64 | __u64 sc_lo1; |
| 65 | __u64 sc_lo2; |
| 66 | __u64 sc_lo3; |
| 67 | __u64 sc_pc; |
| 68 | __u32 sc_fpc_csr; |
| 69 | __u32 sc_used_math; |
| 70 | __u32 sc_dsp; |
| 71 | __u32 sc_reserved; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 72 | }; |
| 73 | |
| 74 | #ifdef __KERNEL__ |
| 75 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 76 | struct sigcontext32 { |
Ralf Baechle | e50c0a8 | 2005-05-31 11:49:19 +0000 | [diff] [blame] | 77 | __u32 sc_regmask; /* Unused */ |
Franck Bui-Huu | 6bfe966 | 2007-02-05 15:24:26 +0100 | [diff] [blame] | 78 | __u32 sc_status; /* Unused */ |
Ralf Baechle | e50c0a8 | 2005-05-31 11:49:19 +0000 | [diff] [blame] | 79 | __u64 sc_pc; |
| 80 | __u64 sc_regs[32]; |
| 81 | __u64 sc_fpregs[32]; |
Franck Bui-Huu | 9693a85 | 2007-02-02 17:41:47 +0100 | [diff] [blame] | 82 | __u32 sc_acx; /* Only MIPS32; was sc_ownedfp */ |
Ralf Baechle | e50c0a8 | 2005-05-31 11:49:19 +0000 | [diff] [blame] | 83 | __u32 sc_fpc_csr; |
| 84 | __u32 sc_fpc_eir; /* Unused */ |
| 85 | __u32 sc_used_math; |
| 86 | __u32 sc_dsp; /* dsp status, was sc_ssflags */ |
| 87 | __u64 sc_mdhi; |
| 88 | __u64 sc_mdlo; |
| 89 | __u32 sc_hi1; /* Was sc_cause */ |
| 90 | __u32 sc_lo1; /* Was sc_badvaddr */ |
| 91 | __u32 sc_hi2; /* Was sc_sigset[4] */ |
| 92 | __u32 sc_lo2; |
| 93 | __u32 sc_hi3; |
| 94 | __u32 sc_lo3; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 95 | }; |
| 96 | #endif /* __KERNEL__ */ |
| 97 | |
| 98 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */ |
| 99 | |
| 100 | #endif /* _ASM_SIGCONTEXT_H */ |