chsc.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. extern void chsc_process_crw(void);
  32. struct css_general_char {
  33. u64 : 41;
  34. u32 aif : 1; /* bit 41 */
  35. u32 : 3;
  36. u32 mcss : 1; /* bit 45 */
  37. u32 : 2;
  38. u32 ext_mb : 1; /* bit 48 */
  39. u32 : 7;
  40. u32 aif_tdd : 1; /* bit 56 */
  41. u32 : 1;
  42. u32 qebsm : 1; /* bit 58 */
  43. u32 : 8;
  44. u32 aif_osa : 1; /* bit 67 */
  45. u32 : 28;
  46. }__attribute__((packed));
  47. struct css_chsc_char {
  48. u64 res;
  49. u64 : 20;
  50. u32 secm : 1; /* bit 84 */
  51. u32 : 1;
  52. u32 scmc : 1; /* bit 86 */
  53. u32 : 20;
  54. u32 scssc : 1; /* bit 107 */
  55. u32 scsscf : 1; /* bit 108 */
  56. u32 : 19;
  57. }__attribute__((packed));
  58. extern struct css_general_char css_general_characteristics;
  59. extern struct css_chsc_char css_chsc_characteristics;
  60. struct chsc_ssd_info {
  61. u8 path_mask;
  62. u8 fla_valid_mask;
  63. struct chp_id chpid[8];
  64. u16 fla[8];
  65. };
  66. extern int chsc_get_ssd_info(struct subchannel_id schid,
  67. struct chsc_ssd_info *ssd);
  68. extern int chsc_determine_css_characteristics(void);
  69. extern int css_characteristics_avail;
  70. extern int chsc_enable_facility(int);
  71. struct channel_subsystem;
  72. extern int chsc_secm(struct channel_subsystem *, int);
  73. int chsc_chp_vary(struct chp_id chpid, int on);
  74. int chsc_determine_channel_path_description(struct chp_id chpid,
  75. struct channel_path_desc *desc);
  76. void chsc_chp_online(struct chp_id chpid);
  77. void chsc_chp_offline(struct chp_id chpid);
  78. int chsc_get_channel_measurement_chars(struct channel_path *chp);
  79. #endif