chsc.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. #ifndef S390_CHSC_H
  2. #define S390_CHSC_H
  3. #include <linux/types.h>
  4. #include <linux/device.h>
  5. #include <asm/chpid.h>
  6. #include "schid.h"
  7. #define CHSC_SDA_OC_MSS 0x2
  8. struct chsc_header {
  9. u16 length;
  10. u16 code;
  11. } __attribute__ ((packed));
  12. #define NR_MEASUREMENT_CHARS 5
  13. struct cmg_chars {
  14. u32 values[NR_MEASUREMENT_CHARS];
  15. } __attribute__ ((packed));
  16. #define NR_MEASUREMENT_ENTRIES 8
  17. struct cmg_entry {
  18. u32 values[NR_MEASUREMENT_ENTRIES];
  19. } __attribute__ ((packed));
  20. struct channel_path_desc {
  21. u8 flags;
  22. u8 lsn;
  23. u8 desc;
  24. u8 chpid;
  25. u8 swla;
  26. u8 zeroes;
  27. u8 chla;
  28. u8 chpp;
  29. } __attribute__ ((packed));
  30. struct channel_path;
  31. struct css_general_char {
  32. u64 : 41;
  33. u32 aif : 1; /* bit 41 */
  34. u32 : 3;
  35. u32 mcss : 1; /* bit 45 */
  36. u32 : 2;
  37. u32 ext_mb : 1; /* bit 48 */
  38. u32 : 7;
  39. u32 aif_tdd : 1; /* bit 56 */
  40. u32 : 1;
  41. u32 qebsm : 1; /* bit 58 */
  42. u32 : 8;
  43. u32 aif_osa : 1; /* bit 67 */
  44. u32 : 20;
  45. u32 fcx : 1; /* bit 88 */
  46. u32 : 7;
  47. }__attribute__((packed));
  48. struct css_chsc_char {
  49. u64 res;
  50. u64 : 20;
  51. u32 secm : 1; /* bit 84 */
  52. u32 : 1;
  53. u32 scmc : 1; /* bit 86 */
  54. u32 : 20;
  55. u32 scssc : 1; /* bit 107 */
  56. u32 scsscf : 1; /* bit 108 */
  57. u32 : 19;
  58. }__attribute__((packed));
  59. extern struct css_general_char css_general_characteristics;
  60. extern struct css_chsc_char css_chsc_characteristics;
  61. struct chsc_ssd_info {
  62. u8 path_mask;
  63. u8 fla_valid_mask;
  64. struct chp_id chpid[8];
  65. u16 fla[8];
  66. };
  67. extern int chsc_get_ssd_info(struct subchannel_id schid,
  68. struct chsc_ssd_info *ssd);
  69. extern int chsc_determine_css_characteristics(void);
  70. extern int chsc_alloc_sei_area(void);
  71. extern void chsc_free_sei_area(void);
  72. extern int chsc_enable_facility(int);
  73. struct channel_subsystem;
  74. extern int chsc_secm(struct channel_subsystem *, int);
  75. int chsc_chp_vary(struct chp_id chpid, int on);
  76. int chsc_determine_channel_path_description(struct chp_id chpid,
  77. struct channel_path_desc *desc);
  78. void chsc_chp_online(struct chp_id chpid);
  79. void chsc_chp_offline(struct chp_id chpid);
  80. int chsc_get_channel_measurement_chars(struct channel_path *chp);
  81. #endif