1*6f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 29807f759SDavid Howells /* 39807f759SDavid Howells * S390 version 49807f759SDavid Howells * Copyright IBM Corp. 1999, 2000 59807f759SDavid Howells */ 69807f759SDavid Howells 79807f759SDavid Howells #ifndef _ASM_S390_SIGCONTEXT_H 89807f759SDavid Howells #define _ASM_S390_SIGCONTEXT_H 99807f759SDavid Howells 109807f759SDavid Howells #include <linux/compiler.h> 1180703617SMartin Schwidefsky #include <linux/types.h> 129807f759SDavid Howells 139807f759SDavid Howells #define __NUM_GPRS 16 149807f759SDavid Howells #define __NUM_FPRS 16 159807f759SDavid Howells #define __NUM_ACRS 16 1680703617SMartin Schwidefsky #define __NUM_VXRS 32 1780703617SMartin Schwidefsky #define __NUM_VXRS_LOW 16 1880703617SMartin Schwidefsky #define __NUM_VXRS_HIGH 16 199807f759SDavid Howells 209807f759SDavid Howells #ifndef __s390x__ 219807f759SDavid Howells 229807f759SDavid Howells /* Has to be at least _NSIG_WORDS from asm/signal.h */ 239807f759SDavid Howells #define _SIGCONTEXT_NSIG 64 249807f759SDavid Howells #define _SIGCONTEXT_NSIG_BPW 32 259807f759SDavid Howells /* Size of stack frame allocated when calling signal handler. */ 269807f759SDavid Howells #define __SIGNAL_FRAMESIZE 96 279807f759SDavid Howells 289807f759SDavid Howells #else /* __s390x__ */ 299807f759SDavid Howells 309807f759SDavid Howells /* Has to be at least _NSIG_WORDS from asm/signal.h */ 319807f759SDavid Howells #define _SIGCONTEXT_NSIG 64 329807f759SDavid Howells #define _SIGCONTEXT_NSIG_BPW 64 339807f759SDavid Howells /* Size of stack frame allocated when calling signal handler. */ 349807f759SDavid Howells #define __SIGNAL_FRAMESIZE 160 359807f759SDavid Howells 369807f759SDavid Howells #endif /* __s390x__ */ 379807f759SDavid Howells 389807f759SDavid Howells #define _SIGCONTEXT_NSIG_WORDS (_SIGCONTEXT_NSIG / _SIGCONTEXT_NSIG_BPW) 399807f759SDavid Howells #define _SIGMASK_COPY_SIZE (sizeof(unsigned long)*_SIGCONTEXT_NSIG_WORDS) 409807f759SDavid Howells 419807f759SDavid Howells typedef struct 429807f759SDavid Howells { 439807f759SDavid Howells unsigned long mask; 449807f759SDavid Howells unsigned long addr; 459807f759SDavid Howells } __attribute__ ((aligned(8))) _psw_t; 469807f759SDavid Howells 479807f759SDavid Howells typedef struct 489807f759SDavid Howells { 499807f759SDavid Howells _psw_t psw; 509807f759SDavid Howells unsigned long gprs[__NUM_GPRS]; 519807f759SDavid Howells unsigned int acrs[__NUM_ACRS]; 529807f759SDavid Howells } _s390_regs_common; 539807f759SDavid Howells 549807f759SDavid Howells typedef struct 559807f759SDavid Howells { 569807f759SDavid Howells unsigned int fpc; 574725c860SMartin Schwidefsky unsigned int pad; 589807f759SDavid Howells double fprs[__NUM_FPRS]; 599807f759SDavid Howells } _s390_fp_regs; 609807f759SDavid Howells 619807f759SDavid Howells typedef struct 629807f759SDavid Howells { 639807f759SDavid Howells _s390_regs_common regs; 649807f759SDavid Howells _s390_fp_regs fpregs; 659807f759SDavid Howells } _sigregs; 669807f759SDavid Howells 6780703617SMartin Schwidefsky typedef struct 6880703617SMartin Schwidefsky { 6980703617SMartin Schwidefsky #ifndef __s390x__ 7080703617SMartin Schwidefsky unsigned long gprs_high[__NUM_GPRS]; 7180703617SMartin Schwidefsky #endif 7280703617SMartin Schwidefsky unsigned long long vxrs_low[__NUM_VXRS_LOW]; 7380703617SMartin Schwidefsky __vector128 vxrs_high[__NUM_VXRS_HIGH]; 7480703617SMartin Schwidefsky unsigned char __reserved[128]; 7580703617SMartin Schwidefsky } _sigregs_ext; 7680703617SMartin Schwidefsky 779807f759SDavid Howells struct sigcontext 789807f759SDavid Howells { 799807f759SDavid Howells unsigned long oldmask[_SIGCONTEXT_NSIG_WORDS]; 809807f759SDavid Howells _sigregs __user *sregs; 819807f759SDavid Howells }; 829807f759SDavid Howells 839807f759SDavid Howells 849807f759SDavid Howells #endif 859807f759SDavid Howells 86