161730c53SDavid Howells /* 261730c53SDavid Howells * This file is subject to the terms and conditions of the GNU General Public 361730c53SDavid Howells * License. See the file "COPYING" in the main directory of this archive 461730c53SDavid Howells * for more details. 561730c53SDavid Howells * 661730c53SDavid Howells * Copyright (C) 1996, 1997, 1999 by Ralf Baechle 761730c53SDavid Howells * Copyright (C) 1999 Silicon Graphics, Inc. 861730c53SDavid Howells */ 961730c53SDavid Howells #ifndef _UAPI_ASM_SIGCONTEXT_H 1061730c53SDavid Howells #define _UAPI_ASM_SIGCONTEXT_H 1161730c53SDavid Howells 1261730c53SDavid Howells #include <linux/types.h> 1361730c53SDavid Howells #include <asm/sgidefs.h> 1461730c53SDavid Howells 150d071fa3SPaul Burton /* scalar FP context was used */ 160d071fa3SPaul Burton #define USED_FP (1 << 0) 170d071fa3SPaul Burton 180d071fa3SPaul Burton /* the value of Status.FR when context was saved */ 190d071fa3SPaul Burton #define USED_FR1 (1 << 1) 200d071fa3SPaul Burton 210d071fa3SPaul Burton /* FR=1, but with odd singles in bits 63:32 of preceding even double */ 220d071fa3SPaul Burton #define USED_HYBRID_FPRS (1 << 2) 230d071fa3SPaul Burton 24*f1fe2d21SPaul Burton /* extended context was used, see struct extcontext for details */ 25*f1fe2d21SPaul Burton #define USED_EXTCONTEXT (1 << 3) 26*f1fe2d21SPaul Burton 2761730c53SDavid Howells #if _MIPS_SIM == _MIPS_SIM_ABI32 2861730c53SDavid Howells 2961730c53SDavid Howells /* 3061730c53SDavid Howells * Keep this struct definition in sync with the sigcontext fragment 315f7e6310SRalf Baechle * in arch/mips/kernel/asm-offsets.c 3261730c53SDavid Howells */ 3361730c53SDavid Howells struct sigcontext { 3461730c53SDavid Howells unsigned int sc_regmask; /* Unused */ 3561730c53SDavid Howells unsigned int sc_status; /* Unused */ 3661730c53SDavid Howells unsigned long long sc_pc; 3761730c53SDavid Howells unsigned long long sc_regs[32]; 3861730c53SDavid Howells unsigned long long sc_fpregs[32]; 3961730c53SDavid Howells unsigned int sc_acx; /* Was sc_ownedfp */ 4061730c53SDavid Howells unsigned int sc_fpc_csr; 4161730c53SDavid Howells unsigned int sc_fpc_eir; /* Unused */ 4261730c53SDavid Howells unsigned int sc_used_math; 4361730c53SDavid Howells unsigned int sc_dsp; /* dsp status, was sc_ssflags */ 4461730c53SDavid Howells unsigned long long sc_mdhi; 4561730c53SDavid Howells unsigned long long sc_mdlo; 4661730c53SDavid Howells unsigned long sc_hi1; /* Was sc_cause */ 4761730c53SDavid Howells unsigned long sc_lo1; /* Was sc_badvaddr */ 4861730c53SDavid Howells unsigned long sc_hi2; /* Was sc_sigset[4] */ 4961730c53SDavid Howells unsigned long sc_lo2; 5061730c53SDavid Howells unsigned long sc_hi3; 5161730c53SDavid Howells unsigned long sc_lo3; 5261730c53SDavid Howells }; 5361730c53SDavid Howells 5461730c53SDavid Howells #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ 5561730c53SDavid Howells 5661730c53SDavid Howells #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 5761730c53SDavid Howells 5861730c53SDavid Howells #include <linux/posix_types.h> 5961730c53SDavid Howells /* 6061730c53SDavid Howells * Keep this struct definition in sync with the sigcontext fragment 615f7e6310SRalf Baechle * in arch/mips/kernel/asm-offsets.c 6261730c53SDavid Howells * 6361730c53SDavid Howells * Warning: this structure illdefined with sc_badvaddr being just an unsigned 6461730c53SDavid Howells * int so it was changed to unsigned long in 2.6.0-test1. This may break 6561730c53SDavid Howells * binary compatibility - no prisoners. 6661730c53SDavid Howells * DSP ASE in 2.6.12-rc4. Turn sc_mdhi and sc_mdlo into an array of four 6761730c53SDavid Howells * entries, add sc_dsp and sc_reserved for padding. No prisoners. 6861730c53SDavid Howells */ 6961730c53SDavid Howells struct sigcontext { 7061730c53SDavid Howells __u64 sc_regs[32]; 7161730c53SDavid Howells __u64 sc_fpregs[32]; 7261730c53SDavid Howells __u64 sc_mdhi; 7361730c53SDavid Howells __u64 sc_hi1; 7461730c53SDavid Howells __u64 sc_hi2; 7561730c53SDavid Howells __u64 sc_hi3; 7661730c53SDavid Howells __u64 sc_mdlo; 7761730c53SDavid Howells __u64 sc_lo1; 7861730c53SDavid Howells __u64 sc_lo2; 7961730c53SDavid Howells __u64 sc_lo3; 8061730c53SDavid Howells __u64 sc_pc; 8161730c53SDavid Howells __u32 sc_fpc_csr; 8261730c53SDavid Howells __u32 sc_used_math; 8361730c53SDavid Howells __u32 sc_dsp; 8461730c53SDavid Howells __u32 sc_reserved; 8561730c53SDavid Howells }; 8661730c53SDavid Howells 8761730c53SDavid Howells 8861730c53SDavid Howells #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */ 8961730c53SDavid Howells 9061730c53SDavid Howells #endif /* _UAPI_ASM_SIGCONTEXT_H */ 91