]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | #ifndef S390_CHSC_H |
2 | #define S390_CHSC_H | |
3 | ||
f86635fa PO |
4 | #include <linux/types.h> |
5 | #include <linux/device.h> | |
e5854a58 | 6 | #include <asm/chpid.h> |
9d92a7e1 CH |
7 | #include <asm/chsc.h> |
8 | #include <asm/schid.h> | |
f86635fa | 9 | |
fb6958a5 CH |
10 | #define CHSC_SDA_OC_MSS 0x2 |
11 | ||
1da177e4 LT |
12 | struct chsc_header { |
13 | u16 length; | |
14 | u16 code; | |
0f008aa3 | 15 | } __attribute__ ((packed)); |
1da177e4 | 16 | |
495a5b45 CH |
17 | #define NR_MEASUREMENT_CHARS 5 |
18 | struct cmg_chars { | |
19 | u32 values[NR_MEASUREMENT_CHARS]; | |
0f008aa3 | 20 | } __attribute__ ((packed)); |
495a5b45 CH |
21 | |
22 | #define NR_MEASUREMENT_ENTRIES 8 | |
23 | struct cmg_entry { | |
24 | u32 values[NR_MEASUREMENT_ENTRIES]; | |
0f008aa3 | 25 | } __attribute__ ((packed)); |
495a5b45 | 26 | |
1da177e4 LT |
27 | struct channel_path_desc { |
28 | u8 flags; | |
29 | u8 lsn; | |
30 | u8 desc; | |
31 | u8 chpid; | |
32 | u8 swla; | |
33 | u8 zeroes; | |
34 | u8 chla; | |
35 | u8 chpp; | |
0f008aa3 | 36 | } __attribute__ ((packed)); |
1da177e4 | 37 | |
e6b6e10a | 38 | struct channel_path; |
1da177e4 | 39 | |
1da177e4 | 40 | struct css_general_char { |
9d92a7e1 CH |
41 | u64 : 12; |
42 | u32 dynio : 1; /* bit 12 */ | |
43 | u32 : 28; | |
1da177e4 LT |
44 | u32 aif : 1; /* bit 41 */ |
45 | u32 : 3; | |
46 | u32 mcss : 1; /* bit 45 */ | |
9d92a7e1 CH |
47 | u32 fcs : 1; /* bit 46 */ |
48 | u32 : 1; | |
1da177e4 LT |
49 | u32 ext_mb : 1; /* bit 48 */ |
50 | u32 : 7; | |
51 | u32 aif_tdd : 1; /* bit 56 */ | |
8129ee16 FP |
52 | u32 : 1; |
53 | u32 qebsm : 1; /* bit 58 */ | |
54 | u32 : 8; | |
1da177e4 | 55 | u32 aif_osa : 1; /* bit 67 */ |
9d92a7e1 CH |
56 | u32 : 14; |
57 | u32 cib : 1; /* bit 82 */ | |
58 | u32 : 5; | |
4f2bd92e PO |
59 | u32 fcx : 1; /* bit 88 */ |
60 | u32 : 7; | |
1da177e4 LT |
61 | }__attribute__((packed)); |
62 | ||
63 | struct css_chsc_char { | |
64 | u64 res; | |
495a5b45 CH |
65 | u64 : 20; |
66 | u32 secm : 1; /* bit 84 */ | |
67 | u32 : 1; | |
68 | u32 scmc : 1; /* bit 86 */ | |
69 | u32 : 20; | |
1da177e4 LT |
70 | u32 scssc : 1; /* bit 107 */ |
71 | u32 scsscf : 1; /* bit 108 */ | |
72 | u32 : 19; | |
73 | }__attribute__((packed)); | |
74 | ||
75 | extern struct css_general_char css_general_characteristics; | |
76 | extern struct css_chsc_char css_chsc_characteristics; | |
77 | ||
7ad6a249 PO |
78 | struct chsc_ssd_info { |
79 | u8 path_mask; | |
80 | u8 fla_valid_mask; | |
81 | struct chp_id chpid[8]; | |
82 | u16 fla[8]; | |
83 | }; | |
84 | extern int chsc_get_ssd_info(struct subchannel_id schid, | |
85 | struct chsc_ssd_info *ssd); | |
1da177e4 | 86 | extern int chsc_determine_css_characteristics(void); |
4434a38c CH |
87 | extern int chsc_alloc_sei_area(void); |
88 | extern void chsc_free_sei_area(void); | |
1da177e4 | 89 | |
fb6958a5 | 90 | extern int chsc_enable_facility(int); |
495a5b45 CH |
91 | struct channel_subsystem; |
92 | extern int chsc_secm(struct channel_subsystem *, int); | |
dcbd16d5 | 93 | int __chsc_do_secm(struct channel_subsystem *css, int enable, void *page); |
fb6958a5 | 94 | |
e6b6e10a | 95 | int chsc_chp_vary(struct chp_id chpid, int on); |
9d92a7e1 CH |
96 | int chsc_determine_channel_path_desc(struct chp_id chpid, int fmt, int rfmt, |
97 | int c, int m, | |
98 | struct chsc_response_struct *resp); | |
99 | int chsc_determine_base_channel_path_desc(struct chp_id chpid, | |
100 | struct channel_path_desc *desc); | |
83b3370c | 101 | void chsc_chp_online(struct chp_id chpid); |
e6b6e10a PO |
102 | void chsc_chp_offline(struct chp_id chpid); |
103 | int chsc_get_channel_measurement_chars(struct channel_path *chp); | |
a28c6944 | 104 | |
dae39843 CH |
105 | int chsc_error_from_response(int response); |
106 | ||
1da177e4 | 107 | #endif |