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