xref: /openbmc/linux/arch/s390/include/uapi/asm/hypfs.h (revision bc5aa3a0)
1 /*
2  * Structures for hypfs interface
3  *
4  * Copyright IBM Corp. 2013
5  *
6  * Author: Martin Schwidefsky <schwidefsky@de.ibm.com>
7  */
8 
9 #ifndef _ASM_HYPFS_H
10 #define _ASM_HYPFS_H
11 
12 #include <linux/types.h>
13 
14 /*
15  * IOCTL for binary interface /sys/kernel/debug/diag_304
16  */
17 struct hypfs_diag304 {
18 	__u32	args[2];
19 	__u64	data;
20 	__u64	rc;
21 } __attribute__((packed));
22 
23 #define HYPFS_IOCTL_MAGIC 0x10
24 
25 #define HYPFS_DIAG304 \
26 	_IOWR(HYPFS_IOCTL_MAGIC, 0x20, struct hypfs_diag304)
27 
28 /*
29  * Structures for binary interface /sys/kernel/debug/diag_0c
30  */
31 struct hypfs_diag0c_hdr {
32 	__u64	len;		/* Length of diag0c buffer without header */
33 	__u16	version;	/* Version of header */
34 	char	reserved1[6];	/* Reserved */
35 	char	tod_ext[16];	/* TOD clock for diag0c */
36 	__u64	count;		/* Number of entries (CPUs) in diag0c array */
37 	char	reserved2[24];	/* Reserved */
38 };
39 
40 struct hypfs_diag0c_entry {
41 	char	date[8];	/* MM/DD/YY in EBCDIC */
42 	char	time[8];	/* HH:MM:SS in EBCDIC */
43 	__u64	virtcpu;	/* Virtual time consumed by the virt CPU (us) */
44 	__u64	totalproc;	/* Total of virtual and simulation time (us) */
45 	__u32	cpu;		/* Linux logical CPU number */
46 	__u32	reserved;	/* Align to 8 byte */
47 };
48 
49 struct hypfs_diag0c_data {
50 	struct hypfs_diag0c_hdr		hdr;		/* 64 byte header */
51 	struct hypfs_diag0c_entry	entry[];	/* diag0c entry array */
52 };
53 
54 #endif
55