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
{
33 } __attribute__ ((packed
));
35 struct channel_path_desc_fmt1
{
51 } __attribute__ ((packed
));
55 struct css_chsc_char
{
58 u32 secm
: 1; /* bit 84 */
60 u32 scmc
: 1; /* bit 86 */
62 u32 scssc
: 1; /* bit 107 */
63 u32 scsscf
: 1; /* bit 108 */
65 }__attribute__((packed
));
67 extern struct css_chsc_char css_chsc_characteristics
;
69 struct chsc_ssd_info
{
72 struct chp_id chpid
[8];
76 struct chsc_ssqd_area
{
77 struct chsc_header request
;
85 struct chsc_header response
;
87 struct qdio_ssqd_desc qdio_ssqd
;
90 struct chsc_scssc_area
{
91 struct chsc_header request
;
96 u64 summary_indicator_addr
;
97 u64 subchannel_indicator_addr
;
104 struct subchannel_id schid
;
106 struct chsc_header response
;
111 struct chsc_header request
;
123 struct chsc_header response
;
124 u8 data
[PAGE_SIZE
- 20];
125 } __attribute__ ((packed
));
128 extern int chsc_get_ssd_info(struct subchannel_id schid
,
129 struct chsc_ssd_info
*ssd
);
130 extern int chsc_determine_css_characteristics(void);
131 extern int chsc_init(void);
132 extern void chsc_init_cleanup(void);
134 extern int chsc_enable_facility(int);
135 struct channel_subsystem
;
136 extern int chsc_secm(struct channel_subsystem
*, int);
137 int __chsc_do_secm(struct channel_subsystem
*css
, int enable
);
139 int chsc_chp_vary(struct chp_id chpid
, int on
);
140 int chsc_determine_channel_path_desc(struct chp_id chpid
, int fmt
, int rfmt
,
141 int c
, int m
, void *page
);
142 int chsc_determine_base_channel_path_desc(struct chp_id chpid
,
143 struct channel_path_desc
*desc
);
144 int chsc_determine_fmt1_channel_path_desc(struct chp_id chpid
,
145 struct channel_path_desc_fmt1
*desc
);
146 void chsc_chp_online(struct chp_id chpid
);
147 void chsc_chp_offline(struct chp_id chpid
);
148 int chsc_get_channel_measurement_chars(struct channel_path
*chp
);
149 int chsc_ssqd(struct subchannel_id schid
, struct chsc_ssqd_area
*ssqd
);
150 int chsc_sadc(struct subchannel_id schid
, struct chsc_scssc_area
*scssc
,
151 u64 summary_indicator_addr
, u64 subchannel_indicator_addr
);
152 int chsc_error_from_response(int response
);
154 int chsc_siosl(struct subchannel_id schid
);
156 /* Functions and definitions to query storage-class memory. */
169 struct chsc_scm_info
{
170 struct chsc_header request
;
174 struct chsc_header response
;
186 struct sale scmal
[248];
189 int chsc_scm_info(struct chsc_scm_info
*scm_area
, u64 token
);
191 #ifdef CONFIG_SCM_BUS
192 int scm_update_information(void);
193 int scm_process_availability_information(void);
194 #else /* CONFIG_SCM_BUS */
195 static inline int scm_update_information(void) { return 0; }
196 static inline int scm_process_availability_information(void) { return 0; }
197 #endif /* CONFIG_SCM_BUS */