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