18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 48c2ecf20Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 58c2ecf20Sopenharmony_ci * for more details. 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Copyright (C) 1996, 1997, 1999 by Ralf Baechle 88c2ecf20Sopenharmony_ci * Copyright (C) 1999 Silicon Graphics, Inc. 98c2ecf20Sopenharmony_ci */ 108c2ecf20Sopenharmony_ci#ifndef _UAPI_ASM_SIGCONTEXT_H 118c2ecf20Sopenharmony_ci#define _UAPI_ASM_SIGCONTEXT_H 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#include <linux/types.h> 148c2ecf20Sopenharmony_ci#include <asm/sgidefs.h> 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci/* scalar FP context was used */ 178c2ecf20Sopenharmony_ci#define USED_FP (1 << 0) 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci/* the value of Status.FR when context was saved */ 208c2ecf20Sopenharmony_ci#define USED_FR1 (1 << 1) 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci/* FR=1, but with odd singles in bits 63:32 of preceding even double */ 238c2ecf20Sopenharmony_ci#define USED_HYBRID_FPRS (1 << 2) 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci/* extended context was used, see struct extcontext for details */ 268c2ecf20Sopenharmony_ci#define USED_EXTCONTEXT (1 << 3) 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci#if _MIPS_SIM == _MIPS_SIM_ABI32 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci/* 318c2ecf20Sopenharmony_ci * Keep this struct definition in sync with the sigcontext fragment 328c2ecf20Sopenharmony_ci * in arch/mips/kernel/asm-offsets.c 338c2ecf20Sopenharmony_ci */ 348c2ecf20Sopenharmony_cistruct sigcontext { 358c2ecf20Sopenharmony_ci unsigned int sc_regmask; /* Unused */ 368c2ecf20Sopenharmony_ci unsigned int sc_status; /* Unused */ 378c2ecf20Sopenharmony_ci unsigned long long sc_pc; 388c2ecf20Sopenharmony_ci unsigned long long sc_regs[32]; 398c2ecf20Sopenharmony_ci unsigned long long sc_fpregs[32]; 408c2ecf20Sopenharmony_ci unsigned int sc_acx; /* Was sc_ownedfp */ 418c2ecf20Sopenharmony_ci unsigned int sc_fpc_csr; 428c2ecf20Sopenharmony_ci unsigned int sc_fpc_eir; /* Unused */ 438c2ecf20Sopenharmony_ci unsigned int sc_used_math; 448c2ecf20Sopenharmony_ci unsigned int sc_dsp; /* dsp status, was sc_ssflags */ 458c2ecf20Sopenharmony_ci unsigned long long sc_mdhi; 468c2ecf20Sopenharmony_ci unsigned long long sc_mdlo; 478c2ecf20Sopenharmony_ci unsigned long sc_hi1; /* Was sc_cause */ 488c2ecf20Sopenharmony_ci unsigned long sc_lo1; /* Was sc_badvaddr */ 498c2ecf20Sopenharmony_ci unsigned long sc_hi2; /* Was sc_sigset[4] */ 508c2ecf20Sopenharmony_ci unsigned long sc_lo2; 518c2ecf20Sopenharmony_ci unsigned long sc_hi3; 528c2ecf20Sopenharmony_ci unsigned long sc_lo3; 538c2ecf20Sopenharmony_ci}; 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci#if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci#include <linux/posix_types.h> 608c2ecf20Sopenharmony_ci/* 618c2ecf20Sopenharmony_ci * Keep this struct definition in sync with the sigcontext fragment 628c2ecf20Sopenharmony_ci * in arch/mips/kernel/asm-offsets.c 638c2ecf20Sopenharmony_ci * 648c2ecf20Sopenharmony_ci * Warning: this structure illdefined with sc_badvaddr being just an unsigned 658c2ecf20Sopenharmony_ci * int so it was changed to unsigned long in 2.6.0-test1. This may break 668c2ecf20Sopenharmony_ci * binary compatibility - no prisoners. 678c2ecf20Sopenharmony_ci * DSP ASE in 2.6.12-rc4. Turn sc_mdhi and sc_mdlo into an array of four 688c2ecf20Sopenharmony_ci * entries, add sc_dsp and sc_reserved for padding. No prisoners. 698c2ecf20Sopenharmony_ci */ 708c2ecf20Sopenharmony_cistruct sigcontext { 718c2ecf20Sopenharmony_ci __u64 sc_regs[32]; 728c2ecf20Sopenharmony_ci __u64 sc_fpregs[32]; 738c2ecf20Sopenharmony_ci __u64 sc_mdhi; 748c2ecf20Sopenharmony_ci __u64 sc_hi1; 758c2ecf20Sopenharmony_ci __u64 sc_hi2; 768c2ecf20Sopenharmony_ci __u64 sc_hi3; 778c2ecf20Sopenharmony_ci __u64 sc_mdlo; 788c2ecf20Sopenharmony_ci __u64 sc_lo1; 798c2ecf20Sopenharmony_ci __u64 sc_lo2; 808c2ecf20Sopenharmony_ci __u64 sc_lo3; 818c2ecf20Sopenharmony_ci __u64 sc_pc; 828c2ecf20Sopenharmony_ci __u32 sc_fpc_csr; 838c2ecf20Sopenharmony_ci __u32 sc_used_math; 848c2ecf20Sopenharmony_ci __u32 sc_dsp; 858c2ecf20Sopenharmony_ci __u32 sc_reserved; 868c2ecf20Sopenharmony_ci}; 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */ 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci#endif /* _UAPI_ASM_SIGCONTEXT_H */ 92