forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/s390/char/sclp.h
....@@ -63,6 +63,9 @@
6363 typedef unsigned int sclp_cmdw_t;
6464
6565 #define SCLP_CMDW_READ_CPU_INFO 0x00010001
66
+#define SCLP_CMDW_READ_SCP_INFO 0x00020001
67
+#define SCLP_CMDW_READ_STORAGE_INFO 0x00040001
68
+#define SCLP_CMDW_READ_SCP_INFO_FORCED 0x00120001
6669 #define SCLP_CMDW_READ_EVENT_DATA 0x00770005
6770 #define SCLP_CMDW_WRITE_EVENT_DATA 0x00760005
6871 #define SCLP_CMDW_WRITE_EVENT_MASK 0x00780005
....@@ -156,6 +159,58 @@
156159 u8 reserved[4096 - 16];
157160 } __attribute__((packed, aligned(PAGE_SIZE)));
158161
162
+struct read_info_sccb {
163
+ struct sccb_header header; /* 0-7 */
164
+ u16 rnmax; /* 8-9 */
165
+ u8 rnsize; /* 10 */
166
+ u8 _pad_11[16 - 11]; /* 11-15 */
167
+ u16 ncpurl; /* 16-17 */
168
+ u16 cpuoff; /* 18-19 */
169
+ u8 _pad_20[24 - 20]; /* 20-23 */
170
+ u8 loadparm[8]; /* 24-31 */
171
+ u8 _pad_32[42 - 32]; /* 32-41 */
172
+ u8 fac42; /* 42 */
173
+ u8 fac43; /* 43 */
174
+ u8 _pad_44[48 - 44]; /* 44-47 */
175
+ u64 facilities; /* 48-55 */
176
+ u8 _pad_56[66 - 56]; /* 56-65 */
177
+ u8 fac66; /* 66 */
178
+ u8 _pad_67[76 - 67]; /* 67-83 */
179
+ u32 ibc; /* 76-79 */
180
+ u8 _pad80[84 - 80]; /* 80-83 */
181
+ u8 fac84; /* 84 */
182
+ u8 fac85; /* 85 */
183
+ u8 _pad_86[91 - 86]; /* 86-90 */
184
+ u8 fac91; /* 91 */
185
+ u8 _pad_92[98 - 92]; /* 92-97 */
186
+ u8 fac98; /* 98 */
187
+ u8 hamaxpow; /* 99 */
188
+ u32 rnsize2; /* 100-103 */
189
+ u64 rnmax2; /* 104-111 */
190
+ u32 hsa_size; /* 112-115 */
191
+ u8 fac116; /* 116 */
192
+ u8 fac117; /* 117 */
193
+ u8 fac118; /* 118 */
194
+ u8 fac119; /* 119 */
195
+ u16 hcpua; /* 120-121 */
196
+ u8 _pad_122[124 - 122]; /* 122-123 */
197
+ u32 hmfai; /* 124-127 */
198
+ u8 _pad_128[134 - 128]; /* 128-133 */
199
+ u8 byte_134; /* 134 */
200
+ u8 cpudirq; /* 135 */
201
+ u16 cbl; /* 136-137 */
202
+ u8 _pad_138[4096 - 138]; /* 138-4095 */
203
+} __packed __aligned(PAGE_SIZE);
204
+
205
+struct read_storage_sccb {
206
+ struct sccb_header header;
207
+ u16 max_id;
208
+ u16 assigned;
209
+ u16 standby;
210
+ u16 :16;
211
+ u32 entries[0];
212
+} __packed;
213
+
159214 static inline void sclp_fill_core_info(struct sclp_core_info *info,
160215 struct read_cpu_info_sccb *sccb)
161216 {
....@@ -174,7 +229,7 @@
174229 #define SCLP_HAS_CPU_INFO (sclp.facilities & 0x0800000000000000ULL)
175230 #define SCLP_HAS_CPU_RECONFIG (sclp.facilities & 0x0400000000000000ULL)
176231 #define SCLP_HAS_PCI_RECONFIG (sclp.facilities & 0x0000000040000000ULL)
177
-
232
+#define SCLP_HAS_AP_RECONFIG (sclp.facilities & 0x0000000100000000ULL)
178233
179234 struct gds_subvector {
180235 u8 length;
....@@ -250,9 +305,7 @@
250305 int sclp_reactivate(void);
251306 int sclp_sync_request(sclp_cmdw_t command, void *sccb);
252307 int sclp_sync_request_timeout(sclp_cmdw_t command, void *sccb, int timeout);
253
-
254308 int sclp_sdias_init(void);
255
-void sclp_sdias_exit(void);
256309
257310 enum {
258311 sclp_init_state_uninitialized,
....@@ -266,7 +319,7 @@
266319 extern unsigned long sclp_console_full;
267320 extern bool sclp_mask_compat_mode;
268321
269
-extern char sclp_early_sccb[PAGE_SIZE];
322
+extern char *sclp_early_sccb;
270323
271324 void sclp_early_wait_irq(void);
272325 int sclp_early_cmd(sclp_cmdw_t cmd, void *sccb);
....@@ -275,6 +328,7 @@
275328 int sclp_early_set_event_mask(struct init_sccb *sccb,
276329 sccb_mask_t receive_mask,
277330 sccb_mask_t send_mask);
331
+int sclp_early_get_info(struct read_info_sccb *info);
278332
279333 /* useful inlines */
280334
....@@ -311,14 +365,14 @@
311365
312366 /* translate string from EBCDIC to ASCII */
313367 static inline void
314
-sclp_ebcasc_str(unsigned char *str, int nr)
368
+sclp_ebcasc_str(char *str, int nr)
315369 {
316370 (MACHINE_IS_VM) ? EBCASC(str, nr) : EBCASC_500(str, nr);
317371 }
318372
319373 /* translate string from ASCII to EBCDIC */
320374 static inline void
321
-sclp_ascebc_str(unsigned char *str, int nr)
375
+sclp_ascebc_str(char *str, int nr)
322376 {
323377 (MACHINE_IS_VM) ? ASCEBC(str, nr) : ASCEBC_500(str, nr);
324378 }