4 #include <linux/types.h>
5 #include <linux/device.h>
6 #include <asm/css_chars.h>
12 #define CHSC_SDA_OC_MSS 0x2
14 #define NR_MEASUREMENT_CHARS 5
16 u32 values[NR_MEASUREMENT_CHARS];
17 } __attribute__ ((packed));
19 #define NR_MEASUREMENT_ENTRIES 8
21 u32 values[NR_MEASUREMENT_ENTRIES];
22 } __attribute__ ((packed));
24 struct channel_path_desc_fmt1 {
40 } __attribute__ ((packed));
44 struct css_chsc_char {
47 u32 secm : 1; /* bit 84 */
49 u32 scmc : 1; /* bit 86 */
51 u32 scssc : 1; /* bit 107 */
52 u32 scsscf : 1; /* bit 108 */
54 u32 pnso:1; /* bit 116 */
56 }__attribute__((packed));
58 extern struct css_chsc_char css_chsc_characteristics;
60 struct chsc_ssd_info {
63 struct chp_id chpid[8];
67 struct chsc_ssqd_area {
68 struct chsc_header request;
76 struct chsc_header response;
78 struct qdio_ssqd_desc qdio_ssqd;
81 struct chsc_scssc_area {
82 struct chsc_header request;
87 u64 summary_indicator_addr;
88 u64 subchannel_indicator_addr;
95 struct subchannel_id schid;
97 struct chsc_header response;
102 struct chsc_header request;
114 struct chsc_header response;
115 u8 data[PAGE_SIZE - 20];
116 } __attribute__ ((packed));
118 struct chsc_sda_area {
119 struct chsc_header request;
126 u32 operation_data_area[252];
127 struct chsc_header response;
131 } __packed __aligned(PAGE_SIZE);
133 extern int chsc_get_ssd_info(struct subchannel_id schid,
134 struct chsc_ssd_info *ssd);
135 extern int chsc_determine_css_characteristics(void);
136 extern int chsc_init(void);
137 extern void chsc_init_cleanup(void);
139 int __chsc_enable_facility(struct chsc_sda_area *sda_area, int operation_code);
140 extern int chsc_enable_facility(int);
141 struct channel_subsystem;
142 extern int chsc_secm(struct channel_subsystem *, int);
143 int __chsc_do_secm(struct channel_subsystem *css, int enable);
145 int chsc_chp_vary(struct chp_id chpid, int on);
146 int chsc_determine_channel_path_desc(struct chp_id chpid, int fmt, int rfmt,
147 int c, int m, void *page);
148 int chsc_determine_base_channel_path_desc(struct chp_id chpid,
149 struct channel_path_desc *desc);
150 int chsc_determine_fmt1_channel_path_desc(struct chp_id chpid,
151 struct channel_path_desc_fmt1 *desc);
152 void chsc_chp_online(struct chp_id chpid);
153 void chsc_chp_offline(struct chp_id chpid);
154 int chsc_get_channel_measurement_chars(struct channel_path *chp);
155 int chsc_ssqd(struct subchannel_id schid, struct chsc_ssqd_area *ssqd);
156 int chsc_sadc(struct subchannel_id schid, struct chsc_scssc_area *scssc,
157 u64 summary_indicator_addr, u64 subchannel_indicator_addr);
158 int chsc_error_from_response(int response);
160 int chsc_siosl(struct subchannel_id schid);
162 /* Functions and definitions to query storage-class memory. */
175 struct chsc_scm_info {
176 struct chsc_header request;
180 struct chsc_header response;
192 struct sale scmal[248];
195 int chsc_scm_info(struct chsc_scm_info *scm_area, u64 token);
197 struct chsc_brinfo_resume_token {
202 struct chsc_brinfo_naihdr {
203 struct chsc_brinfo_resume_token resume_token;
211 struct chsc_pnso_area {
212 struct chsc_header request;
225 struct chsc_brinfo_resume_token resume_token;
229 struct chsc_header response;
231 struct chsc_brinfo_naihdr naihdr;
233 struct qdio_brinfo_entry_l3_ipv6 l3_ipv6[0];
234 struct qdio_brinfo_entry_l3_ipv4 l3_ipv4[0];
235 struct qdio_brinfo_entry_l2 l2[0];
239 int chsc_pnso_brinfo(struct subchannel_id schid,
240 struct chsc_pnso_area *brinfo_area,
241 struct chsc_brinfo_resume_token resume_token,
244 #ifdef CONFIG_SCM_BUS
245 int scm_update_information(void);
246 int scm_process_availability_information(void);
247 #else /* CONFIG_SCM_BUS */
248 static inline int scm_update_information(void) { return 0; }
249 static inline int scm_process_availability_information(void) { return 0; }
250 #endif /* CONFIG_SCM_BUS */