xref: /linux/arch/s390/include/asm/diag.h (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2c6557e7fSMartin Schwidefsky /*
3c6557e7fSMartin Schwidefsky  * s390 diagnose functions
4c6557e7fSMartin Schwidefsky  *
5c6557e7fSMartin Schwidefsky  * Copyright IBM Corp. 2007
6c6557e7fSMartin Schwidefsky  * Author(s): Michael Holzheu <holzheu@de.ibm.com>
7c6557e7fSMartin Schwidefsky  */
8c6557e7fSMartin Schwidefsky 
9c6557e7fSMartin Schwidefsky #ifndef _ASM_S390_DIAG_H
10c6557e7fSMartin Schwidefsky #define _ASM_S390_DIAG_H
11c6557e7fSMartin Schwidefsky 
121b030478SJulian Wiedmann #include <linux/if_ether.h>
131ec2772eSMartin Schwidefsky #include <linux/percpu.h>
14d09a307fSHeiko Carstens #include <asm/asm-extable.h>
1597999f8cSMete Durlu #include <asm/sclp.h>
16fbaee746SSven Schnelle #include <asm/cio.h>
171ec2772eSMartin Schwidefsky 
181ec2772eSMartin Schwidefsky enum diag_stat_enum {
191ec2772eSMartin Schwidefsky 	DIAG_STAT_X008,
201ec2772eSMartin Schwidefsky 	DIAG_STAT_X00C,
211ec2772eSMartin Schwidefsky 	DIAG_STAT_X010,
221ec2772eSMartin Schwidefsky 	DIAG_STAT_X014,
231ec2772eSMartin Schwidefsky 	DIAG_STAT_X044,
241ec2772eSMartin Schwidefsky 	DIAG_STAT_X064,
25fbaee746SSven Schnelle 	DIAG_STAT_X08C,
261ec2772eSMartin Schwidefsky 	DIAG_STAT_X09C,
271ec2772eSMartin Schwidefsky 	DIAG_STAT_X0DC,
281ec2772eSMartin Schwidefsky 	DIAG_STAT_X204,
291ec2772eSMartin Schwidefsky 	DIAG_STAT_X210,
301ec2772eSMartin Schwidefsky 	DIAG_STAT_X224,
311ec2772eSMartin Schwidefsky 	DIAG_STAT_X250,
321ec2772eSMartin Schwidefsky 	DIAG_STAT_X258,
331b030478SJulian Wiedmann 	DIAG_STAT_X26C,
341ec2772eSMartin Schwidefsky 	DIAG_STAT_X288,
351ec2772eSMartin Schwidefsky 	DIAG_STAT_X2C4,
361ec2772eSMartin Schwidefsky 	DIAG_STAT_X2FC,
371ec2772eSMartin Schwidefsky 	DIAG_STAT_X304,
381ec2772eSMartin Schwidefsky 	DIAG_STAT_X308,
394ad78b86SCollin Walling 	DIAG_STAT_X318,
408cf57d72SAnastasia Eskova 	DIAG_STAT_X320,
41*2c6c9cccSTobias Huschle 	DIAG_STAT_X49C,
421ec2772eSMartin Schwidefsky 	DIAG_STAT_X500,
431ec2772eSMartin Schwidefsky 	NR_DIAG_STAT
441ec2772eSMartin Schwidefsky };
451ec2772eSMartin Schwidefsky 
46b5a6b71bSMartin Schwidefsky void diag_stat_inc(enum diag_stat_enum nr);
47b5a6b71bSMartin Schwidefsky void diag_stat_inc_norecursion(enum diag_stat_enum nr);
481ec2772eSMartin Schwidefsky 
49e98eda92SHeiko Carstens struct hypfs_diag0c_entry;
50e98eda92SHeiko Carstens 
51e98eda92SHeiko Carstens /*
52e98eda92SHeiko Carstens  * Diagnose 0c: Pseudo Timer
53e98eda92SHeiko Carstens  */
54e98eda92SHeiko Carstens void diag0c(struct hypfs_diag0c_entry *data);
55e98eda92SHeiko Carstens 
56c6557e7fSMartin Schwidefsky /*
5783ace270SMichael Holzheu  * Diagnose 10: Release page range
58c6557e7fSMartin Schwidefsky  */
diag10_range(unsigned long start_pfn,unsigned long num_pfn)5983ace270SMichael Holzheu static inline void diag10_range(unsigned long start_pfn, unsigned long num_pfn)
6083ace270SMichael Holzheu {
6183ace270SMichael Holzheu 	unsigned long start_addr, end_addr;
6283ace270SMichael Holzheu 
639d6305c2SHeiko Carstens 	start_addr = pfn_to_phys(start_pfn);
649d6305c2SHeiko Carstens 	end_addr = pfn_to_phys(start_pfn + num_pfn - 1);
6583ace270SMichael Holzheu 
661ec2772eSMartin Schwidefsky 	diag_stat_inc(DIAG_STAT_X010);
6783ace270SMichael Holzheu 	asm volatile(
6883ace270SMichael Holzheu 		"0:	diag	%0,%1,0x10\n"
696c22c986SHeiko Carstens 		"1:	nopr	%%r7\n"
7083ace270SMichael Holzheu 		EX_TABLE(0b, 1b)
7183ace270SMichael Holzheu 		EX_TABLE(1b, 1b)
7283ace270SMichael Holzheu 		: : "a" (start_addr), "a" (end_addr));
7383ace270SMichael Holzheu }
74c6557e7fSMartin Schwidefsky 
75c6557e7fSMartin Schwidefsky /*
76c6557e7fSMartin Schwidefsky  * Diagnose 14: Input spool file manipulation
77c6557e7fSMartin Schwidefsky  */
78c6557e7fSMartin Schwidefsky extern int diag14(unsigned long rx, unsigned long ry1, unsigned long subcode);
79c6557e7fSMartin Schwidefsky 
80c6557e7fSMartin Schwidefsky /*
81c6557e7fSMartin Schwidefsky  * Diagnose 210: Get information about a virtual device
82c6557e7fSMartin Schwidefsky  */
83c6557e7fSMartin Schwidefsky struct diag210 {
84c6557e7fSMartin Schwidefsky 	u16 vrdcdvno;	/* device number (input) */
85c6557e7fSMartin Schwidefsky 	u16 vrdclen;	/* data block length (input) */
86c6557e7fSMartin Schwidefsky 	u8 vrdcvcla;	/* virtual device class (output) */
87c6557e7fSMartin Schwidefsky 	u8 vrdcvtyp;	/* virtual device type (output) */
88c6557e7fSMartin Schwidefsky 	u8 vrdcvsta;	/* virtual device status (output) */
89c6557e7fSMartin Schwidefsky 	u8 vrdcvfla;	/* virtual device flags (output) */
90c6557e7fSMartin Schwidefsky 	u8 vrdcrccl;	/* real device class (output) */
91c6557e7fSMartin Schwidefsky 	u8 vrdccrty;	/* real device type (output) */
92c6557e7fSMartin Schwidefsky 	u8 vrdccrmd;	/* real device model (output) */
93c6557e7fSMartin Schwidefsky 	u8 vrdccrft;	/* real device feature (output) */
94fe5e23ddSSven Schnelle } __packed __aligned(4);
95c6557e7fSMartin Schwidefsky 
96c6557e7fSMartin Schwidefsky extern int diag210(struct diag210 *addr);
97c6557e7fSMartin Schwidefsky 
98fbaee746SSven Schnelle struct diag8c {
99fbaee746SSven Schnelle 	u8 flags;
100fbaee746SSven Schnelle 	u8 num_partitions;
101fbaee746SSven Schnelle 	u16 width;
102fbaee746SSven Schnelle 	u16 height;
1033071e9b3SGustavo A. R. Silva 	u8 data[];
104fbaee746SSven Schnelle } __packed __aligned(4);
105fbaee746SSven Schnelle 
106fbaee746SSven Schnelle extern int diag8c(struct diag8c *out, struct ccw_dev_id *devno);
107fbaee746SSven Schnelle 
108e65f30e0SJanosch Frank /* bit is set in flags, when physical cpu info is included in diag 204 data */
109e65f30e0SJanosch Frank #define DIAG204_LPAR_PHYS_FLG 0x80
110e65f30e0SJanosch Frank #define DIAG204_LPAR_NAME_LEN 8		/* lpar name len in diag 204 data */
111e65f30e0SJanosch Frank #define DIAG204_CPU_NAME_LEN 16		/* type name len of cpus in diag224 name table */
112e65f30e0SJanosch Frank 
113e65f30e0SJanosch Frank /* diag 204 subcodes */
114e65f30e0SJanosch Frank enum diag204_sc {
115e65f30e0SJanosch Frank 	DIAG204_SUBC_STIB4 = 4,
116e65f30e0SJanosch Frank 	DIAG204_SUBC_RSI = 5,
117e65f30e0SJanosch Frank 	DIAG204_SUBC_STIB6 = 6,
118e65f30e0SJanosch Frank 	DIAG204_SUBC_STIB7 = 7
119e65f30e0SJanosch Frank };
120e65f30e0SJanosch Frank 
121c83cd4feSHeiko Carstens #define DIAG204_SUBCODE_MASK 0xffff
12297999f8cSMete Durlu #define DIAG204_BIF_BIT 0x80000000
123f4493954SMete Durlu #define DIAG204_BUSY_WAIT (HZ / 10)
124c83cd4feSHeiko Carstens 
125e65f30e0SJanosch Frank /* The two available diag 204 data formats */
126e65f30e0SJanosch Frank enum diag204_format {
127e65f30e0SJanosch Frank 	DIAG204_INFO_SIMPLE = 0,
128e65f30e0SJanosch Frank 	DIAG204_INFO_EXT = 0x00010000
129e65f30e0SJanosch Frank };
130e65f30e0SJanosch Frank 
131a2d57b35SJanosch Frank enum diag204_cpu_flags {
132a2d57b35SJanosch Frank 	DIAG204_CPU_ONLINE = 0x20,
133a2d57b35SJanosch Frank 	DIAG204_CPU_CAPPED = 0x40,
134a2d57b35SJanosch Frank };
135a2d57b35SJanosch Frank 
136e65f30e0SJanosch Frank struct diag204_info_blk_hdr {
137e65f30e0SJanosch Frank 	__u8  npar;
138e65f30e0SJanosch Frank 	__u8  flags;
139e65f30e0SJanosch Frank 	__u16 tslice;
140e65f30e0SJanosch Frank 	__u16 phys_cpus;
141e65f30e0SJanosch Frank 	__u16 this_part;
142e65f30e0SJanosch Frank 	__u64 curtod;
143e65f30e0SJanosch Frank } __packed;
144e65f30e0SJanosch Frank 
145e65f30e0SJanosch Frank struct diag204_x_info_blk_hdr {
146e65f30e0SJanosch Frank 	__u8  npar;
147e65f30e0SJanosch Frank 	__u8  flags;
148e65f30e0SJanosch Frank 	__u16 tslice;
149e65f30e0SJanosch Frank 	__u16 phys_cpus;
150e65f30e0SJanosch Frank 	__u16 this_part;
151e65f30e0SJanosch Frank 	__u64 curtod1;
152e65f30e0SJanosch Frank 	__u64 curtod2;
153e65f30e0SJanosch Frank 	char reserved[40];
154e65f30e0SJanosch Frank } __packed;
155e65f30e0SJanosch Frank 
156e65f30e0SJanosch Frank struct diag204_part_hdr {
157e65f30e0SJanosch Frank 	__u8 pn;
158e65f30e0SJanosch Frank 	__u8 cpus;
159e65f30e0SJanosch Frank 	char reserved[6];
160e65f30e0SJanosch Frank 	char part_name[DIAG204_LPAR_NAME_LEN];
161e65f30e0SJanosch Frank } __packed;
162e65f30e0SJanosch Frank 
163e65f30e0SJanosch Frank struct diag204_x_part_hdr {
164e65f30e0SJanosch Frank 	__u8  pn;
165e65f30e0SJanosch Frank 	__u8  cpus;
166e65f30e0SJanosch Frank 	__u8  rcpus;
167e65f30e0SJanosch Frank 	__u8  pflag;
168e65f30e0SJanosch Frank 	__u32 mlu;
169e65f30e0SJanosch Frank 	char  part_name[DIAG204_LPAR_NAME_LEN];
170e65f30e0SJanosch Frank 	char  lpc_name[8];
171e65f30e0SJanosch Frank 	char  os_name[8];
172e65f30e0SJanosch Frank 	__u64 online_cs;
173e65f30e0SJanosch Frank 	__u64 online_es;
174e65f30e0SJanosch Frank 	__u8  upid;
175a2d57b35SJanosch Frank 	__u8  reserved:3;
176a2d57b35SJanosch Frank 	__u8  mtid:5;
177a2d57b35SJanosch Frank 	char  reserved1[2];
178e65f30e0SJanosch Frank 	__u32 group_mlu;
179e65f30e0SJanosch Frank 	char  group_name[8];
180a2d57b35SJanosch Frank 	char  hardware_group_name[8];
181a2d57b35SJanosch Frank 	char  reserved2[24];
182e65f30e0SJanosch Frank } __packed;
183e65f30e0SJanosch Frank 
184e65f30e0SJanosch Frank struct diag204_cpu_info {
185e65f30e0SJanosch Frank 	__u16 cpu_addr;
186e65f30e0SJanosch Frank 	char  reserved1[2];
187e65f30e0SJanosch Frank 	__u8  ctidx;
188e65f30e0SJanosch Frank 	__u8  cflag;
189e65f30e0SJanosch Frank 	__u16 weight;
190e65f30e0SJanosch Frank 	__u64 acc_time;
191e65f30e0SJanosch Frank 	__u64 lp_time;
192e65f30e0SJanosch Frank } __packed;
193e65f30e0SJanosch Frank 
194e65f30e0SJanosch Frank struct diag204_x_cpu_info {
195e65f30e0SJanosch Frank 	__u16 cpu_addr;
196e65f30e0SJanosch Frank 	char  reserved1[2];
197e65f30e0SJanosch Frank 	__u8  ctidx;
198e65f30e0SJanosch Frank 	__u8  cflag;
199e65f30e0SJanosch Frank 	__u16 weight;
200e65f30e0SJanosch Frank 	__u64 acc_time;
201e65f30e0SJanosch Frank 	__u64 lp_time;
202e65f30e0SJanosch Frank 	__u16 min_weight;
203e65f30e0SJanosch Frank 	__u16 cur_weight;
204e65f30e0SJanosch Frank 	__u16 max_weight;
205e65f30e0SJanosch Frank 	char  reseved2[2];
206e65f30e0SJanosch Frank 	__u64 online_time;
207e65f30e0SJanosch Frank 	__u64 wait_time;
208e65f30e0SJanosch Frank 	__u32 pma_weight;
209e65f30e0SJanosch Frank 	__u32 polar_weight;
210a2d57b35SJanosch Frank 	__u32 cpu_type_cap;
211a2d57b35SJanosch Frank 	__u32 group_cpu_type_cap;
212a2d57b35SJanosch Frank 	char  reserved3[32];
213e65f30e0SJanosch Frank } __packed;
214e65f30e0SJanosch Frank 
215e65f30e0SJanosch Frank struct diag204_phys_hdr {
216e65f30e0SJanosch Frank 	char reserved1[1];
217e65f30e0SJanosch Frank 	__u8 cpus;
218e65f30e0SJanosch Frank 	char reserved2[6];
219e65f30e0SJanosch Frank 	char mgm_name[8];
220e65f30e0SJanosch Frank } __packed;
221e65f30e0SJanosch Frank 
222e65f30e0SJanosch Frank struct diag204_x_phys_hdr {
223e65f30e0SJanosch Frank 	char reserved1[1];
224e65f30e0SJanosch Frank 	__u8 cpus;
225e65f30e0SJanosch Frank 	char reserved2[6];
226e65f30e0SJanosch Frank 	char mgm_name[8];
227e65f30e0SJanosch Frank 	char reserved3[80];
228e65f30e0SJanosch Frank } __packed;
229e65f30e0SJanosch Frank 
230e65f30e0SJanosch Frank struct diag204_phys_cpu {
231e65f30e0SJanosch Frank 	__u16 cpu_addr;
232e65f30e0SJanosch Frank 	char  reserved1[2];
233e65f30e0SJanosch Frank 	__u8  ctidx;
234e65f30e0SJanosch Frank 	char  reserved2[3];
235e65f30e0SJanosch Frank 	__u64 mgm_time;
236e65f30e0SJanosch Frank 	char  reserved3[8];
237e65f30e0SJanosch Frank } __packed;
238e65f30e0SJanosch Frank 
239e65f30e0SJanosch Frank struct diag204_x_phys_cpu {
240e65f30e0SJanosch Frank 	__u16 cpu_addr;
241e65f30e0SJanosch Frank 	char  reserved1[2];
242e65f30e0SJanosch Frank 	__u8  ctidx;
243a2d57b35SJanosch Frank 	char  reserved2[1];
244a2d57b35SJanosch Frank 	__u16 weight;
245e65f30e0SJanosch Frank 	__u64 mgm_time;
246e65f30e0SJanosch Frank 	char  reserved3[80];
247e65f30e0SJanosch Frank } __packed;
248e65f30e0SJanosch Frank 
24995ca2cb5SJanosch Frank struct diag204_x_part_block {
25095ca2cb5SJanosch Frank 	struct diag204_x_part_hdr hdr;
25195ca2cb5SJanosch Frank 	struct diag204_x_cpu_info cpus[];
25295ca2cb5SJanosch Frank } __packed;
25395ca2cb5SJanosch Frank 
25495ca2cb5SJanosch Frank struct diag204_x_phys_block {
25595ca2cb5SJanosch Frank 	struct diag204_x_phys_hdr hdr;
25695ca2cb5SJanosch Frank 	struct diag204_x_phys_cpu cpus[];
25795ca2cb5SJanosch Frank } __packed;
25895ca2cb5SJanosch Frank 
2591b030478SJulian Wiedmann enum diag26c_sc {
260f22237f6SJulian Wiedmann 	DIAG26C_PORT_VNIC    = 0x00000024,
2611b030478SJulian Wiedmann 	DIAG26C_MAC_SERVICES = 0x00000030
2621b030478SJulian Wiedmann };
2631b030478SJulian Wiedmann 
2641b030478SJulian Wiedmann enum diag26c_version {
265f22237f6SJulian Wiedmann 	DIAG26C_VERSION2	 = 0x00000002,	/* z/VM 5.4.0 */
266f22237f6SJulian Wiedmann 	DIAG26C_VERSION6_VM65918 = 0x00020006	/* z/VM 6.4.0 + VM65918 */
2671b030478SJulian Wiedmann };
2681b030478SJulian Wiedmann 
269f22237f6SJulian Wiedmann #define DIAG26C_VNIC_INFO	0x0002
270f22237f6SJulian Wiedmann struct diag26c_vnic_req {
271f22237f6SJulian Wiedmann 	u32	resp_buf_len;
272f22237f6SJulian Wiedmann 	u32	resp_version;
273f22237f6SJulian Wiedmann 	u16	req_format;
274f22237f6SJulian Wiedmann 	u16	vlan_id;
275f22237f6SJulian Wiedmann 	u64	sys_name;
276f22237f6SJulian Wiedmann 	u8	res[2];
277f22237f6SJulian Wiedmann 	u16	devno;
278f22237f6SJulian Wiedmann } __packed __aligned(8);
279f22237f6SJulian Wiedmann 
280f22237f6SJulian Wiedmann #define VNIC_INFO_PROT_L3	1
281f22237f6SJulian Wiedmann #define VNIC_INFO_PROT_L2	2
282f22237f6SJulian Wiedmann /* Note: this is the bare minimum, use it for uninitialized VNICs only. */
283f22237f6SJulian Wiedmann struct diag26c_vnic_resp {
284f22237f6SJulian Wiedmann 	u32	version;
285f22237f6SJulian Wiedmann 	u32	entry_cnt;
286f22237f6SJulian Wiedmann 	/* VNIC info: */
287f22237f6SJulian Wiedmann 	u32	next_entry;
288f22237f6SJulian Wiedmann 	u64	owner;
289f22237f6SJulian Wiedmann 	u16	devno;
290f22237f6SJulian Wiedmann 	u8	status;
291f22237f6SJulian Wiedmann 	u8	type;
292f22237f6SJulian Wiedmann 	u64	lan_owner;
293f22237f6SJulian Wiedmann 	u64	lan_name;
294f22237f6SJulian Wiedmann 	u64	port_name;
295f22237f6SJulian Wiedmann 	u8	port_type;
296f22237f6SJulian Wiedmann 	u8	ext_status:6;
297f22237f6SJulian Wiedmann 	u8	protocol:2;
298f22237f6SJulian Wiedmann 	u16	base_devno;
299f22237f6SJulian Wiedmann 	u32	port_num;
300f22237f6SJulian Wiedmann 	u32	ifindex;
301f22237f6SJulian Wiedmann 	u32	maxinfo;
302f22237f6SJulian Wiedmann 	u32	dev_count;
303f22237f6SJulian Wiedmann 	/* 3x device info: */
304f22237f6SJulian Wiedmann 	u8	dev_info1[28];
305f22237f6SJulian Wiedmann 	u8	dev_info2[28];
306f22237f6SJulian Wiedmann 	u8	dev_info3[28];
307f22237f6SJulian Wiedmann } __packed __aligned(8);
308f22237f6SJulian Wiedmann 
3091b030478SJulian Wiedmann #define DIAG26C_GET_MAC	0x0000
3101b030478SJulian Wiedmann struct diag26c_mac_req {
3111b030478SJulian Wiedmann 	u32	resp_buf_len;
3121b030478SJulian Wiedmann 	u32	resp_version;
3131b030478SJulian Wiedmann 	u16	op_code;
3141b030478SJulian Wiedmann 	u16	devno;
3151b030478SJulian Wiedmann 	u8	res[4];
3161b030478SJulian Wiedmann };
3171b030478SJulian Wiedmann 
3181b030478SJulian Wiedmann struct diag26c_mac_resp {
3191b030478SJulian Wiedmann 	u32	version;
3201b030478SJulian Wiedmann 	u8	mac[ETH_ALEN];
3211b030478SJulian Wiedmann 	u8	res[2];
3221b030478SJulian Wiedmann } __aligned(8);
3231b030478SJulian Wiedmann 
3244ad78b86SCollin Walling #define CPNC_LINUX		0x4
3254ad78b86SCollin Walling union diag318_info {
3264ad78b86SCollin Walling 	unsigned long val;
3274ad78b86SCollin Walling 	struct {
328a23816f3SCollin Walling 		unsigned long cpnc : 8;
329a23816f3SCollin Walling 		unsigned long cpvc : 56;
3304ad78b86SCollin Walling 	};
3314ad78b86SCollin Walling };
3324ad78b86SCollin Walling 
diag204_has_bif(void)33397999f8cSMete Durlu static inline bool diag204_has_bif(void)
33497999f8cSMete Durlu {
33597999f8cSMete Durlu 	return sclp.has_diag204_bif;
33697999f8cSMete Durlu }
33797999f8cSMete Durlu 
338e65f30e0SJanosch Frank int diag204(unsigned long subcode, unsigned long size, void *addr);
339022bd2d1SJanosch Frank int diag224(void *ptr);
3401b030478SJulian Wiedmann int diag26c(void *req, void *resp, enum diag26c_sc subcode);
341a80313ffSGerald Schaefer 
342a80313ffSGerald Schaefer struct hypfs_diag0c_entry;
343a80313ffSGerald Schaefer 
344c78d0c74SHeiko Carstens /*
345c78d0c74SHeiko Carstens  * This structure must contain only pointers/references into
346c78d0c74SHeiko Carstens  * the AMODE31 text section.
347c78d0c74SHeiko Carstens  */
348a80313ffSGerald Schaefer struct diag_ops {
349a80313ffSGerald Schaefer 	int (*diag210)(struct diag210 *addr);
350d8132003SAlexander Gordeev 	int (*diag26c)(unsigned long rx, unsigned long rx1, enum diag26c_sc subcode);
351a80313ffSGerald Schaefer 	int (*diag14)(unsigned long rx, unsigned long ry1, unsigned long subcode);
352fbaee746SSven Schnelle 	int (*diag8c)(struct diag8c *addr, struct ccw_dev_id *devno, size_t len);
353e98eda92SHeiko Carstens 	void (*diag0c)(unsigned long rx);
354a80313ffSGerald Schaefer 	void (*diag308_reset)(void);
355a80313ffSGerald Schaefer };
356a80313ffSGerald Schaefer 
357c78d0c74SHeiko Carstens extern struct diag_ops diag_amode31_ops;
358c78d0c74SHeiko Carstens extern struct diag210 *__diag210_tmp_amode31;
3596bda6670SAlexander Egorenkov 
360c78d0c74SHeiko Carstens int _diag210_amode31(struct diag210 *addr);
361d8132003SAlexander Gordeev int _diag26c_amode31(unsigned long rx, unsigned long rx1, enum diag26c_sc subcode);
362c78d0c74SHeiko Carstens int _diag14_amode31(unsigned long rx, unsigned long ry1, unsigned long subcode);
363e98eda92SHeiko Carstens void _diag0c_amode31(unsigned long rx);
364c78d0c74SHeiko Carstens void _diag308_reset_amode31(void);
365fbaee746SSven Schnelle int _diag8c_amode31(struct diag8c *addr, struct ccw_dev_id *devno, size_t len);
3666bda6670SAlexander Egorenkov 
367*2c6c9cccSTobias Huschle /* diag 49c subcodes */
368*2c6c9cccSTobias Huschle enum diag49c_sc {
369*2c6c9cccSTobias Huschle 	DIAG49C_SUBC_ACK = 0,
370*2c6c9cccSTobias Huschle 	DIAG49C_SUBC_REG = 1
371*2c6c9cccSTobias Huschle };
372*2c6c9cccSTobias Huschle 
373*2c6c9cccSTobias Huschle int diag49c(unsigned long subcode);
374*2c6c9cccSTobias Huschle 
375c6557e7fSMartin Schwidefsky #endif /* _ASM_S390_DIAG_H */
376