stp.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright IBM Corp. 2006
  4. * Author(s): Martin Schwidefsky ([email protected])
  5. */
  6. #ifndef __S390_STP_H
  7. #define __S390_STP_H
  8. #include <linux/compiler.h>
  9. /* notifier for syncs */
  10. extern struct atomic_notifier_head s390_epoch_delta_notifier;
  11. /* STP interruption parameter */
  12. struct stp_irq_parm {
  13. u32 : 14;
  14. u32 tsc : 1; /* Timing status change */
  15. u32 lac : 1; /* Link availability change */
  16. u32 tcpc : 1; /* Time control parameter change */
  17. u32 : 15;
  18. } __packed;
  19. #define STP_OP_SYNC 1
  20. #define STP_OP_CTRL 3
  21. struct stp_sstpi {
  22. u32 : 32;
  23. u32 tu : 1;
  24. u32 lu : 1;
  25. u32 : 6;
  26. u32 stratum : 8;
  27. u32 vbits : 16;
  28. u32 leaps : 16;
  29. u32 tmd : 4;
  30. u32 ctn : 4;
  31. u32 : 3;
  32. u32 c : 1;
  33. u32 tst : 4;
  34. u32 tzo : 16;
  35. u32 dsto : 16;
  36. u32 ctrl : 16;
  37. u32 : 16;
  38. u32 tto;
  39. u32 : 32;
  40. u32 ctnid[3];
  41. u32 : 32;
  42. u64 todoff;
  43. u32 rsvd[50];
  44. } __packed;
  45. struct stp_tzib {
  46. u32 tzan : 16;
  47. u32 : 16;
  48. u32 tzo : 16;
  49. u32 dsto : 16;
  50. u32 stn;
  51. u32 dstn;
  52. u64 dst_on_alg;
  53. u64 dst_off_alg;
  54. } __packed;
  55. struct stp_tcpib {
  56. u32 atcode : 4;
  57. u32 ntcode : 4;
  58. u32 d : 1;
  59. u32 : 23;
  60. s32 tto;
  61. struct stp_tzib atzib;
  62. struct stp_tzib ntzib;
  63. s32 adst_offset : 16;
  64. s32 ndst_offset : 16;
  65. u32 rsvd1;
  66. u64 ntzib_update;
  67. u64 ndsto_update;
  68. } __packed;
  69. struct stp_lsoib {
  70. u32 p : 1;
  71. u32 : 31;
  72. s32 also : 16;
  73. s32 nlso : 16;
  74. u64 nlsout;
  75. } __packed;
  76. struct stp_stzi {
  77. u32 rsvd0[3];
  78. u64 data_ts;
  79. u32 rsvd1[22];
  80. struct stp_tcpib tcpib;
  81. struct stp_lsoib lsoib;
  82. } __packed;
  83. /* Functions needed by the machine check handler */
  84. int stp_sync_check(void);
  85. int stp_island_check(void);
  86. void stp_queue_work(void);
  87. #endif /* __S390_STP_H */