sigcontext.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /*
  3. * S390 version
  4. * Copyright IBM Corp. 1999, 2000
  5. */
  6. #ifndef _ASM_S390_SIGCONTEXT_H
  7. #define _ASM_S390_SIGCONTEXT_H
  8. #include <linux/compiler.h>
  9. #include <linux/types.h>
  10. #define __NUM_GPRS 16
  11. #define __NUM_FPRS 16
  12. #define __NUM_ACRS 16
  13. #define __NUM_VXRS 32
  14. #define __NUM_VXRS_LOW 16
  15. #define __NUM_VXRS_HIGH 16
  16. #ifndef __s390x__
  17. /* Has to be at least _NSIG_WORDS from asm/signal.h */
  18. #define _SIGCONTEXT_NSIG 64
  19. #define _SIGCONTEXT_NSIG_BPW 32
  20. /* Size of stack frame allocated when calling signal handler. */
  21. #define __SIGNAL_FRAMESIZE 96
  22. #else /* __s390x__ */
  23. /* Has to be at least _NSIG_WORDS from asm/signal.h */
  24. #define _SIGCONTEXT_NSIG 64
  25. #define _SIGCONTEXT_NSIG_BPW 64
  26. /* Size of stack frame allocated when calling signal handler. */
  27. #define __SIGNAL_FRAMESIZE 160
  28. #endif /* __s390x__ */
  29. #define _SIGCONTEXT_NSIG_WORDS (_SIGCONTEXT_NSIG / _SIGCONTEXT_NSIG_BPW)
  30. #define _SIGMASK_COPY_SIZE (sizeof(unsigned long)*_SIGCONTEXT_NSIG_WORDS)
  31. typedef struct
  32. {
  33. unsigned long mask;
  34. unsigned long addr;
  35. } __attribute__ ((aligned(8))) _psw_t;
  36. typedef struct
  37. {
  38. _psw_t psw;
  39. unsigned long gprs[__NUM_GPRS];
  40. unsigned int acrs[__NUM_ACRS];
  41. } _s390_regs_common;
  42. typedef struct
  43. {
  44. unsigned int fpc;
  45. unsigned int pad;
  46. double fprs[__NUM_FPRS];
  47. } _s390_fp_regs;
  48. typedef struct
  49. {
  50. _s390_regs_common regs;
  51. _s390_fp_regs fpregs;
  52. } _sigregs;
  53. typedef struct
  54. {
  55. #ifndef __s390x__
  56. unsigned long gprs_high[__NUM_GPRS];
  57. #endif
  58. unsigned long long vxrs_low[__NUM_VXRS_LOW];
  59. __vector128 vxrs_high[__NUM_VXRS_HIGH];
  60. unsigned char __reserved[128];
  61. } _sigregs_ext;
  62. struct sigcontext
  63. {
  64. unsigned long oldmask[_SIGCONTEXT_NSIG_WORDS];
  65. _sigregs __user *sregs;
  66. };
  67. #endif