4 #include <linux/types.h>
5 #include <linux/device.h>
6 #include <asm/css_chars.h>
11 #define CHSC_SDA_OC_MSS 0x2
16 } __attribute__ ((packed));
18 #define NR_MEASUREMENT_CHARS 5
20 u32 values[NR_MEASUREMENT_CHARS];
21 } __attribute__ ((packed));
23 #define NR_MEASUREMENT_ENTRIES 8
25 u32 values[NR_MEASUREMENT_ENTRIES];
26 } __attribute__ ((packed));
28 struct channel_path_desc {
37 } __attribute__ ((packed));
39 struct channel_path_desc_fmt1 {
53 } __attribute__ ((packed));
57 struct css_chsc_char {
60 u32 secm : 1; /* bit 84 */
62 u32 scmc : 1; /* bit 86 */
64 u32 scssc : 1; /* bit 107 */
65 u32 scsscf : 1; /* bit 108 */
67 }__attribute__((packed));
69 extern struct css_chsc_char css_chsc_characteristics;
71 struct chsc_ssd_info {
74 struct chp_id chpid[8];
79 struct chsc_header request;
91 struct chsc_header response;
92 u8 data[PAGE_SIZE - 20];
93 } __attribute__ ((packed));
96 extern int chsc_get_ssd_info(struct subchannel_id schid,
97 struct chsc_ssd_info *ssd);
98 extern int chsc_determine_css_characteristics(void);
99 extern int chsc_init(void);
100 extern void chsc_init_cleanup(void);
102 extern int chsc_enable_facility(int);
103 struct channel_subsystem;
104 extern int chsc_secm(struct channel_subsystem *, int);
105 int __chsc_do_secm(struct channel_subsystem *css, int enable);
107 int chsc_chp_vary(struct chp_id chpid, int on);
108 int chsc_determine_channel_path_desc(struct chp_id chpid, int fmt, int rfmt,
109 int c, int m, void *page);
110 int chsc_determine_base_channel_path_desc(struct chp_id chpid,
111 struct channel_path_desc *desc);
112 int chsc_determine_fmt1_channel_path_desc(struct chp_id chpid,
113 struct channel_path_desc_fmt1 *desc);
114 void chsc_chp_online(struct chp_id chpid);
115 void chsc_chp_offline(struct chp_id chpid);
116 int chsc_get_channel_measurement_chars(struct channel_path *chp);
118 int chsc_error_from_response(int response);
120 int chsc_siosl(struct subchannel_id schid);
122 /* Functions and definitions to query storage-class memory. */
135 struct chsc_scm_info {
136 struct chsc_header request;
140 struct chsc_header response;
152 struct sale scmal[248];
155 int chsc_scm_info(struct chsc_scm_info *scm_area, u64 token);
157 #ifdef CONFIG_SCM_BUS
158 int scm_update_information(void);
159 int scm_process_availability_information(void);
160 #else /* CONFIG_SCM_BUS */
161 static inline int scm_update_information(void) { return 0; }
162 static inline int scm_process_availability_information(void) { return 0; }
163 #endif /* CONFIG_SCM_BUS */