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> |
7ad6a249 | 7 | #include "schid.h" |
f86635fa | 8 | |
fb6958a5 CH |
9 | #define CHSC_SDA_OC_MSS 0x2 |
10 | ||
1da177e4 LT |
11 | struct chsc_header { |
12 | u16 length; | |
13 | u16 code; | |
0f008aa3 | 14 | } __attribute__ ((packed)); |
1da177e4 | 15 | |
495a5b45 CH |
16 | #define NR_MEASUREMENT_CHARS 5 |
17 | struct cmg_chars { | |
18 | u32 values[NR_MEASUREMENT_CHARS]; | |
0f008aa3 | 19 | } __attribute__ ((packed)); |
495a5b45 CH |
20 | |
21 | #define NR_MEASUREMENT_ENTRIES 8 | |
22 | struct cmg_entry { | |
23 | u32 values[NR_MEASUREMENT_ENTRIES]; | |
0f008aa3 | 24 | } __attribute__ ((packed)); |
495a5b45 | 25 | |
1da177e4 LT |
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; | |
0f008aa3 | 35 | } __attribute__ ((packed)); |
1da177e4 | 36 | |
e6b6e10a | 37 | struct channel_path; |
1da177e4 | 38 | |
83b3370c | 39 | extern void chsc_process_crw(void); |
1da177e4 LT |
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 */ | |
8129ee16 FP |
50 | u32 : 1; |
51 | u32 qebsm : 1; /* bit 58 */ | |
52 | u32 : 8; | |
1da177e4 LT |
53 | u32 aif_osa : 1; /* bit 67 */ |
54 | u32 : 28; | |
55 | }__attribute__((packed)); | |
56 | ||
57 | struct css_chsc_char { | |
58 | u64 res; | |
495a5b45 CH |
59 | u64 : 20; |
60 | u32 secm : 1; /* bit 84 */ | |
61 | u32 : 1; | |
62 | u32 scmc : 1; /* bit 86 */ | |
63 | u32 : 20; | |
1da177e4 LT |
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 | ||
7ad6a249 PO |
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); | |
1da177e4 LT |
80 | extern int chsc_determine_css_characteristics(void); |
81 | extern int css_characteristics_avail; | |
4434a38c CH |
82 | extern int chsc_alloc_sei_area(void); |
83 | extern void chsc_free_sei_area(void); | |
1da177e4 | 84 | |
fb6958a5 | 85 | extern int chsc_enable_facility(int); |
495a5b45 CH |
86 | struct channel_subsystem; |
87 | extern int chsc_secm(struct channel_subsystem *, int); | |
fb6958a5 | 88 | |
e6b6e10a PO |
89 | int chsc_chp_vary(struct chp_id chpid, int on); |
90 | int chsc_determine_channel_path_description(struct chp_id chpid, | |
91 | struct channel_path_desc *desc); | |
83b3370c | 92 | void chsc_chp_online(struct chp_id chpid); |
e6b6e10a PO |
93 | void chsc_chp_offline(struct chp_id chpid); |
94 | int chsc_get_channel_measurement_chars(struct channel_path *chp); | |
a28c6944 | 95 | |
1da177e4 | 96 | #endif |