blob: cefa657dd04a86268923122e5bb8fce3ec1fa480 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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 Baechle42a3b4f2005-09-03 15:56:17 -070013
Linus Torvalds1da177e2005-04-16 15:20:36 -070014#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 */
20struct sigcontext {
21 unsigned int sc_regmask; /* Unused */
22 unsigned int sc_status;
23 unsigned long long sc_pc;
24 unsigned long long sc_regs[32];
25 unsigned long long sc_fpregs[32];
26 unsigned int sc_ownedfp; /* Unused */
27 unsigned int sc_fpc_csr;
28 unsigned int sc_fpc_eir; /* Unused */
29 unsigned int sc_used_math;
Ralf Baechlee50c0a82005-05-31 11:49:19 +000030 unsigned int sc_dsp; /* dsp status, was sc_ssflags */
Linus Torvalds1da177e2005-04-16 15:20:36 -070031 unsigned long long sc_mdhi;
32 unsigned long long sc_mdlo;
Ralf Baechlee50c0a82005-05-31 11:49:19 +000033 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 Torvalds1da177e2005-04-16 15:20:36 -070039};
40
41#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
Ralf Baechle42a3b4f2005-09-03 15:56:17 -070042
Linus Torvalds1da177e2005-04-16 15:20:36 -070043#if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
44
45/*
46 * Keep this struct definition in sync with the sigcontext fragment
47 * in arch/mips/tools/offset.c
48 *
49 * Warning: this structure illdefined with sc_badvaddr being just an unsigned
50 * int so it was changed to unsigned long in 2.6.0-test1. This may break
51 * binary compatibility - no prisoners.
Ralf Baechlee50c0a82005-05-31 11:49:19 +000052 * DSP ASE in 2.6.12-rc4. Turn sc_mdhi and sc_mdlo into an array of four
53 * entries, add sc_dsp and sc_reserved for padding. No prisoners.
Linus Torvalds1da177e2005-04-16 15:20:36 -070054 */
55struct sigcontext {
56 unsigned long sc_regs[32];
57 unsigned long sc_fpregs[32];
Daniel Jacobowitz1c0c1ae2006-05-08 15:28:22 -040058 unsigned long sc_mdhi;
59 unsigned long sc_hi1;
60 unsigned long sc_hi2;
61 unsigned long sc_hi3;
62 unsigned long sc_mdlo;
63 unsigned long sc_lo1;
64 unsigned long sc_lo2;
65 unsigned long sc_lo3;
Linus Torvalds1da177e2005-04-16 15:20:36 -070066 unsigned long sc_pc;
Linus Torvalds1da177e2005-04-16 15:20:36 -070067 unsigned int sc_fpc_csr;
Linus Torvalds1da177e2005-04-16 15:20:36 -070068 unsigned int sc_used_math;
Ralf Baechlee50c0a82005-05-31 11:49:19 +000069 unsigned int sc_dsp;
70 unsigned int sc_reserved;
Linus Torvalds1da177e2005-04-16 15:20:36 -070071};
72
73#ifdef __KERNEL__
74
75#include <linux/posix_types.h>
76
77struct sigcontext32 {
Ralf Baechlee50c0a82005-05-31 11:49:19 +000078 __u32 sc_regmask; /* Unused */
79 __u32 sc_status;
80 __u64 sc_pc;
81 __u64 sc_regs[32];
82 __u64 sc_fpregs[32];
83 __u32 sc_ownedfp; /* Unused */
84 __u32 sc_fpc_csr;
85 __u32 sc_fpc_eir; /* Unused */
86 __u32 sc_used_math;
87 __u32 sc_dsp; /* dsp status, was sc_ssflags */
88 __u64 sc_mdhi;
89 __u64 sc_mdlo;
90 __u32 sc_hi1; /* Was sc_cause */
91 __u32 sc_lo1; /* Was sc_badvaddr */
92 __u32 sc_hi2; /* Was sc_sigset[4] */
93 __u32 sc_lo2;
94 __u32 sc_hi3;
95 __u32 sc_lo3;
Linus Torvalds1da177e2005-04-16 15:20:36 -070096};
97#endif /* __KERNEL__ */
98
99#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */
100
101#endif /* _ASM_SIGCONTEXT_H */