blob: 9e89cf99d4e432e29a0f18aef60c3fd7a1d0b764 [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
Jaswinder Singh Rajputae612fb2009-01-31 11:22:18 +053012#include <linux/types.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <asm/sgidefs.h>
Ralf Baechle42a3b4f2005-09-03 15:56:17 -070014
Linus Torvalds1da177e2005-04-16 15:20:36 -070015#if _MIPS_SIM == _MIPS_SIM_ABI32
16
17/*
18 * Keep this struct definition in sync with the sigcontext fragment
19 * in arch/mips/tools/offset.c
20 */
21struct sigcontext {
22 unsigned int sc_regmask; /* Unused */
Franck Bui-Huu6bfe9662007-02-05 15:24:26 +010023 unsigned int sc_status; /* Unused */
Linus Torvalds1da177e2005-04-16 15:20:36 -070024 unsigned long long sc_pc;
25 unsigned long long sc_regs[32];
26 unsigned long long sc_fpregs[32];
Franck Bui-Huu9693a852007-02-02 17:41:47 +010027 unsigned int sc_acx; /* Was sc_ownedfp */
Linus Torvalds1da177e2005-04-16 15:20:36 -070028 unsigned int sc_fpc_csr;
29 unsigned int sc_fpc_eir; /* Unused */
30 unsigned int sc_used_math;
Ralf Baechlee50c0a82005-05-31 11:49:19 +000031 unsigned int sc_dsp; /* dsp status, was sc_ssflags */
Linus Torvalds1da177e2005-04-16 15:20:36 -070032 unsigned long long sc_mdhi;
33 unsigned long long sc_mdlo;
Ralf Baechlee50c0a82005-05-31 11:49:19 +000034 unsigned long sc_hi1; /* Was sc_cause */
35 unsigned long sc_lo1; /* Was sc_badvaddr */
36 unsigned long sc_hi2; /* Was sc_sigset[4] */
37 unsigned long sc_lo2;
38 unsigned long sc_hi3;
39 unsigned long sc_lo3;
Linus Torvalds1da177e2005-04-16 15:20:36 -070040};
41
42#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
Ralf Baechle42a3b4f2005-09-03 15:56:17 -070043
Linus Torvalds1da177e2005-04-16 15:20:36 -070044#if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
45
Atsushi Nemoto269dd2b2007-02-18 00:12:57 +090046#include <linux/posix_types.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070047/*
48 * Keep this struct definition in sync with the sigcontext fragment
49 * in arch/mips/tools/offset.c
50 *
51 * Warning: this structure illdefined with sc_badvaddr being just an unsigned
52 * int so it was changed to unsigned long in 2.6.0-test1. This may break
53 * binary compatibility - no prisoners.
Ralf Baechlee50c0a82005-05-31 11:49:19 +000054 * DSP ASE in 2.6.12-rc4. Turn sc_mdhi and sc_mdlo into an array of four
55 * entries, add sc_dsp and sc_reserved for padding. No prisoners.
Linus Torvalds1da177e2005-04-16 15:20:36 -070056 */
57struct sigcontext {
Atsushi Nemoto269dd2b2007-02-18 00:12:57 +090058 __u64 sc_regs[32];
59 __u64 sc_fpregs[32];
60 __u64 sc_mdhi;
61 __u64 sc_hi1;
62 __u64 sc_hi2;
63 __u64 sc_hi3;
64 __u64 sc_mdlo;
65 __u64 sc_lo1;
66 __u64 sc_lo2;
67 __u64 sc_lo3;
68 __u64 sc_pc;
69 __u32 sc_fpc_csr;
70 __u32 sc_used_math;
71 __u32 sc_dsp;
72 __u32 sc_reserved;
Linus Torvalds1da177e2005-04-16 15:20:36 -070073};
74
75#ifdef __KERNEL__
76
Linus Torvalds1da177e2005-04-16 15:20:36 -070077struct sigcontext32 {
Ralf Baechlee50c0a82005-05-31 11:49:19 +000078 __u32 sc_regmask; /* Unused */
Franck Bui-Huu6bfe9662007-02-05 15:24:26 +010079 __u32 sc_status; /* Unused */
Ralf Baechlee50c0a82005-05-31 11:49:19 +000080 __u64 sc_pc;
81 __u64 sc_regs[32];
82 __u64 sc_fpregs[32];
Franck Bui-Huu9693a852007-02-02 17:41:47 +010083 __u32 sc_acx; /* Only MIPS32; was sc_ownedfp */
Ralf Baechlee50c0a82005-05-31 11:49:19 +000084 __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 */