xref: /linux/arch/s390/include/uapi/asm/diag.h (revision 8838a1a2d219a86ab05e679c73f68dd75a25aca5)
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 /*
3  * Diag ioctls and its associated structures definitions.
4  *
5  * Copyright IBM Corp. 2024
6  */
7 
8 #ifndef __S390_UAPI_ASM_DIAG_H
9 #define __S390_UAPI_ASM_DIAG_H
10 
11 #include <linux/types.h>
12 
13 #define DIAG_MAGIC_STR 'D'
14 
15 struct diag324_pib {
16 	__u64 address;
17 	__u64 sequence;
18 };
19 
20 struct diag310_memtop {
21 	__u64 address;
22 	__u64 nesting_lvl;
23 };
24 
25 /* Diag ioctl definitions */
26 #define DIAG324_GET_PIBBUF	_IOWR(DIAG_MAGIC_STR, 0x77, struct diag324_pib)
27 #define DIAG324_GET_PIBLEN	_IOR(DIAG_MAGIC_STR, 0x78, size_t)
28 #define DIAG310_GET_STRIDE	_IOR(DIAG_MAGIC_STR, 0x79, size_t)
29 #define DIAG310_GET_MEMTOPLEN	_IOWR(DIAG_MAGIC_STR, 0x7a, size_t)
30 #define DIAG310_GET_MEMTOPBUF	_IOWR(DIAG_MAGIC_STR, 0x7b, struct diag310_memtop)
31 
32 #endif /* __S390_UAPI_ASM_DIAG_H */
33