Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * S390 version |
Heiko Carstens | a53c8fa | 2012-07-20 11:15:04 +0200 | [diff] [blame] | 3 | * Copyright IBM Corp. 1999, 2000 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef _ASM_S390_SIGCONTEXT_H |
| 7 | #define _ASM_S390_SIGCONTEXT_H |
| 8 | |
Martin Schwidefsky | 6410dd5 | 2006-01-14 13:20:58 -0800 | [diff] [blame] | 9 | #include <linux/compiler.h> |
Martin Schwidefsky | 8070361 | 2014-10-06 17:53:53 +0200 | [diff] [blame] | 10 | #include <linux/types.h> |
Martin Schwidefsky | 6410dd5 | 2006-01-14 13:20:58 -0800 | [diff] [blame] | 11 | |
Martin Schwidefsky | 8070361 | 2014-10-06 17:53:53 +0200 | [diff] [blame] | 12 | #define __NUM_GPRS 16 |
| 13 | #define __NUM_FPRS 16 |
| 14 | #define __NUM_ACRS 16 |
| 15 | #define __NUM_VXRS 32 |
| 16 | #define __NUM_VXRS_LOW 16 |
| 17 | #define __NUM_VXRS_HIGH 16 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | |
| 19 | #ifndef __s390x__ |
| 20 | |
| 21 | /* Has to be at least _NSIG_WORDS from asm/signal.h */ |
| 22 | #define _SIGCONTEXT_NSIG 64 |
| 23 | #define _SIGCONTEXT_NSIG_BPW 32 |
| 24 | /* Size of stack frame allocated when calling signal handler. */ |
| 25 | #define __SIGNAL_FRAMESIZE 96 |
| 26 | |
| 27 | #else /* __s390x__ */ |
| 28 | |
| 29 | /* Has to be at least _NSIG_WORDS from asm/signal.h */ |
| 30 | #define _SIGCONTEXT_NSIG 64 |
| 31 | #define _SIGCONTEXT_NSIG_BPW 64 |
| 32 | /* Size of stack frame allocated when calling signal handler. */ |
| 33 | #define __SIGNAL_FRAMESIZE 160 |
| 34 | |
| 35 | #endif /* __s390x__ */ |
| 36 | |
| 37 | #define _SIGCONTEXT_NSIG_WORDS (_SIGCONTEXT_NSIG / _SIGCONTEXT_NSIG_BPW) |
| 38 | #define _SIGMASK_COPY_SIZE (sizeof(unsigned long)*_SIGCONTEXT_NSIG_WORDS) |
| 39 | |
| 40 | typedef struct |
| 41 | { |
| 42 | unsigned long mask; |
| 43 | unsigned long addr; |
| 44 | } __attribute__ ((aligned(8))) _psw_t; |
| 45 | |
| 46 | typedef struct |
| 47 | { |
| 48 | _psw_t psw; |
| 49 | unsigned long gprs[__NUM_GPRS]; |
| 50 | unsigned int acrs[__NUM_ACRS]; |
| 51 | } _s390_regs_common; |
| 52 | |
| 53 | typedef struct |
| 54 | { |
| 55 | unsigned int fpc; |
Martin Schwidefsky | 4725c86 | 2013-10-15 16:08:34 +0200 | [diff] [blame] | 56 | unsigned int pad; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | double fprs[__NUM_FPRS]; |
| 58 | } _s390_fp_regs; |
| 59 | |
| 60 | typedef struct |
| 61 | { |
| 62 | _s390_regs_common regs; |
| 63 | _s390_fp_regs fpregs; |
| 64 | } _sigregs; |
| 65 | |
Martin Schwidefsky | 8070361 | 2014-10-06 17:53:53 +0200 | [diff] [blame] | 66 | typedef struct |
| 67 | { |
| 68 | #ifndef __s390x__ |
| 69 | unsigned long gprs_high[__NUM_GPRS]; |
| 70 | #endif |
| 71 | unsigned long long vxrs_low[__NUM_VXRS_LOW]; |
| 72 | __vector128 vxrs_high[__NUM_VXRS_HIGH]; |
| 73 | unsigned char __reserved[128]; |
| 74 | } _sigregs_ext; |
| 75 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 76 | struct sigcontext |
| 77 | { |
| 78 | unsigned long oldmask[_SIGCONTEXT_NSIG_WORDS]; |
Al Viro | c281447 | 2005-09-29 00:16:02 +0100 | [diff] [blame] | 79 | _sigregs __user *sregs; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 80 | }; |
| 81 | |
| 82 | |
| 83 | #endif |
| 84 | |