aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include')
-rw-r--r--arch/s390/include/asm/auxvec.h6
-rw-r--r--arch/s390/include/asm/bitsperlong.h13
-rw-r--r--arch/s390/include/asm/byteorder.h6
-rw-r--r--arch/s390/include/asm/chsc.h156
-rw-r--r--arch/s390/include/asm/dasd.h292
-rw-r--r--arch/s390/include/asm/errno.h13
-rw-r--r--arch/s390/include/asm/fcntl.h1
-rw-r--r--arch/s390/include/asm/ioctl.h1
-rw-r--r--arch/s390/include/asm/ioctls.h8
-rw-r--r--arch/s390/include/asm/ipcbuf.h31
-rw-r--r--arch/s390/include/asm/kvm.h44
-rw-r--r--arch/s390/include/asm/kvm_virtio.h64
-rw-r--r--arch/s390/include/asm/monwriter.h33
-rw-r--r--arch/s390/include/asm/msgbuf.h37
-rw-r--r--arch/s390/include/asm/param.h6
-rw-r--r--arch/s390/include/asm/poll.h1
-rw-r--r--arch/s390/include/asm/posix_types.h107
-rw-r--r--arch/s390/include/asm/qeth.h110
-rw-r--r--arch/s390/include/asm/resource.h15
-rw-r--r--arch/s390/include/asm/sembuf.h29
-rw-r--r--arch/s390/include/asm/shmbuf.h48
-rw-r--r--arch/s390/include/asm/sigcontext.h71
-rw-r--r--arch/s390/include/asm/siginfo.h18
-rw-r--r--arch/s390/include/asm/socket.h73
-rw-r--r--arch/s390/include/asm/sockios.h6
-rw-r--r--arch/s390/include/asm/stat.h105
-rw-r--r--arch/s390/include/asm/statfs.h71
-rw-r--r--arch/s390/include/asm/swab.h91
-rw-r--r--arch/s390/include/asm/system.h277
-rw-r--r--arch/s390/include/asm/tape390.h103
-rw-r--r--arch/s390/include/asm/termbits.h6
-rw-r--r--arch/s390/include/asm/timer.h55
-rw-r--r--arch/s390/include/asm/ucontext.h35
-rw-r--r--arch/s390/include/asm/vtoc.h215
-rw-r--r--arch/s390/include/asm/zcrypt.h276
35 files changed, 2423 insertions, 0 deletions
diff --git a/arch/s390/include/asm/auxvec.h b/arch/s390/include/asm/auxvec.h
new file mode 100644
index 00000000000..a1f153e8913
--- /dev/null
+++ b/arch/s390/include/asm/auxvec.h
@@ -0,0 +1,6 @@
1#ifndef __ASMS390_AUXVEC_H
2#define __ASMS390_AUXVEC_H
3
4#define AT_SYSINFO_EHDR 33
5
6#endif
diff --git a/arch/s390/include/asm/bitsperlong.h b/arch/s390/include/asm/bitsperlong.h
new file mode 100644
index 00000000000..6b235aea9c6
--- /dev/null
+++ b/arch/s390/include/asm/bitsperlong.h
@@ -0,0 +1,13 @@
1#ifndef __ASM_S390_BITSPERLONG_H
2#define __ASM_S390_BITSPERLONG_H
3
4#ifndef __s390x__
5#define __BITS_PER_LONG 32
6#else
7#define __BITS_PER_LONG 64
8#endif
9
10#include <asm-generic/bitsperlong.h>
11
12#endif /* __ASM_S390_BITSPERLONG_H */
13
diff --git a/arch/s390/include/asm/byteorder.h b/arch/s390/include/asm/byteorder.h
new file mode 100644
index 00000000000..a332e59e26f
--- /dev/null
+++ b/arch/s390/include/asm/byteorder.h
@@ -0,0 +1,6 @@
1#ifndef _S390_BYTEORDER_H
2#define _S390_BYTEORDER_H
3
4#include <linux/byteorder/big_endian.h>
5
6#endif /* _S390_BYTEORDER_H */
diff --git a/arch/s390/include/asm/chsc.h b/arch/s390/include/asm/chsc.h
new file mode 100644
index 00000000000..4943654ed7f
--- /dev/null
+++ b/arch/s390/include/asm/chsc.h
@@ -0,0 +1,156 @@
1/*
2 * ioctl interface for /dev/chsc
3 *
4 * Copyright 2008 IBM Corp.
5 * Author(s): Cornelia Huck <cornelia.huck@de.ibm.com>
6 */
7
8#ifndef _ASM_CHSC_H
9#define _ASM_CHSC_H
10
11#include <linux/types.h>
12#include <asm/chpid.h>
13#include <asm/schid.h>
14
15struct chsc_async_header {
16 __u16 length;
17 __u16 code;
18 __u32 cmd_dependend;
19 __u32 key : 4;
20 __u32 : 28;
21 struct subchannel_id sid;
22} __attribute__ ((packed));
23
24struct chsc_async_area {
25 struct chsc_async_header header;
26 __u8 data[PAGE_SIZE - 16 /* size of chsc_async_header */];
27} __attribute__ ((packed));
28
29
30struct chsc_response_struct {
31 __u16 length;
32 __u16 code;
33 __u32 parms;
34 __u8 data[PAGE_SIZE - 8];
35} __attribute__ ((packed));
36
37struct chsc_chp_cd {
38 struct chp_id chpid;
39 int m;
40 int fmt;
41 struct chsc_response_struct cpcb;
42};
43
44struct chsc_cu_cd {
45 __u16 cun;
46 __u8 cssid;
47 int m;
48 int fmt;
49 struct chsc_response_struct cucb;
50};
51
52struct chsc_sch_cud {
53 struct subchannel_id schid;
54 int fmt;
55 struct chsc_response_struct scub;
56};
57
58struct conf_id {
59 int m;
60 __u8 cssid;
61 __u8 ssid;
62};
63
64struct chsc_conf_info {
65 struct conf_id id;
66 int fmt;
67 struct chsc_response_struct scid;
68};
69
70struct ccl_parm_chpid {
71 int m;
72 struct chp_id chp;
73};
74
75struct ccl_parm_cssids {
76 __u8 f_cssid;
77 __u8 l_cssid;
78};
79
80struct chsc_comp_list {
81 struct {
82 enum {
83 CCL_CU_ON_CHP = 1,
84 CCL_CHP_TYPE_CAP = 2,
85 CCL_CSS_IMG = 4,
86 CCL_CSS_IMG_CONF_CHAR = 5,
87 CCL_IOP_CHP = 6,
88 } ctype;
89 int fmt;
90 struct ccl_parm_chpid chpid;
91 struct ccl_parm_cssids cssids;
92 } req;
93 struct chsc_response_struct sccl;
94};
95
96struct chsc_dcal {
97 struct {
98 enum {
99 DCAL_CSS_IID_PN = 4,
100 } atype;
101 __u32 list_parm[2];
102 int fmt;
103 } req;
104 struct chsc_response_struct sdcal;
105};
106
107struct chsc_cpd_info {
108 struct chp_id chpid;
109 int m;
110 int fmt;
111 int rfmt;
112 int c;
113 struct chsc_response_struct chpdb;
114};
115
116#define CHSC_IOCTL_MAGIC 'c'
117
118#define CHSC_START _IOWR(CHSC_IOCTL_MAGIC, 0x81, struct chsc_async_area)
119#define CHSC_INFO_CHANNEL_PATH _IOWR(CHSC_IOCTL_MAGIC, 0x82, \
120 struct chsc_chp_cd)
121#define CHSC_INFO_CU _IOWR(CHSC_IOCTL_MAGIC, 0x83, struct chsc_cu_cd)
122#define CHSC_INFO_SCH_CU _IOWR(CHSC_IOCTL_MAGIC, 0x84, struct chsc_sch_cud)
123#define CHSC_INFO_CI _IOWR(CHSC_IOCTL_MAGIC, 0x85, struct chsc_conf_info)
124#define CHSC_INFO_CCL _IOWR(CHSC_IOCTL_MAGIC, 0x86, struct chsc_comp_list)
125#define CHSC_INFO_CPD _IOWR(CHSC_IOCTL_MAGIC, 0x87, struct chsc_cpd_info)
126#define CHSC_INFO_DCAL _IOWR(CHSC_IOCTL_MAGIC, 0x88, struct chsc_dcal)
127
128#ifdef __KERNEL__
129
130struct css_general_char {
131 u64 : 12;
132 u32 dynio : 1; /* bit 12 */
133 u32 : 28;
134 u32 aif : 1; /* bit 41 */
135 u32 : 3;
136 u32 mcss : 1; /* bit 45 */
137 u32 fcs : 1; /* bit 46 */
138 u32 : 1;
139 u32 ext_mb : 1; /* bit 48 */
140 u32 : 7;
141 u32 aif_tdd : 1; /* bit 56 */
142 u32 : 1;
143 u32 qebsm : 1; /* bit 58 */
144 u32 : 8;
145 u32 aif_osa : 1; /* bit 67 */
146 u32 : 14;
147 u32 cib : 1; /* bit 82 */
148 u32 : 5;
149 u32 fcx : 1; /* bit 88 */
150 u32 : 7;
151}__attribute__((packed));
152
153extern struct css_general_char css_general_characteristics;
154
155#endif /* __KERNEL__ */
156#endif
diff --git a/arch/s390/include/asm/dasd.h b/arch/s390/include/asm/dasd.h
new file mode 100644
index 00000000000..0be28efe5b6
--- /dev/null
+++ b/arch/s390/include/asm/dasd.h
@@ -0,0 +1,292 @@
1/*
2 * File...........: linux/drivers/s390/block/dasd.c
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Bugreports.to..: <Linux390@de.ibm.com>
5 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
6 * EMC Symmetrix ioctl Copyright EMC Corporation, 2008
7 * Author.........: Nigel Hislop <hislop_nigel@emc.com>
8 *
9 * This file is the interface of the DASD device driver, which is exported to user space
10 * any future changes wrt the API will result in a change of the APIVERSION reported
11 * to userspace by the DASDAPIVER-ioctl
12 *
13 */
14
15#ifndef DASD_H
16#define DASD_H
17#include <linux/types.h>
18#include <linux/ioctl.h>
19
20#define DASD_IOCTL_LETTER 'D'
21
22#define DASD_API_VERSION 6
23
24/*
25 * struct dasd_information2_t
26 * represents any data about the device, which is visible to userspace.
27 * including foramt and featueres.
28 */
29typedef struct dasd_information2_t {
30 unsigned int devno; /* S/390 devno */
31 unsigned int real_devno; /* for aliases */
32 unsigned int schid; /* S/390 subchannel identifier */
33 unsigned int cu_type : 16; /* from SenseID */
34 unsigned int cu_model : 8; /* from SenseID */
35 unsigned int dev_type : 16; /* from SenseID */
36 unsigned int dev_model : 8; /* from SenseID */
37 unsigned int open_count;
38 unsigned int req_queue_len;
39 unsigned int chanq_len; /* length of chanq */
40 char type[4]; /* from discipline.name, 'none' for unknown */
41 unsigned int status; /* current device level */
42 unsigned int label_block; /* where to find the VOLSER */
43 unsigned int FBA_layout; /* fixed block size (like AIXVOL) */
44 unsigned int characteristics_size;
45 unsigned int confdata_size;
46 char characteristics[64]; /* from read_device_characteristics */
47 char configuration_data[256]; /* from read_configuration_data */
48 unsigned int format; /* format info like formatted/cdl/ldl/... */
49 unsigned int features; /* dasd features like 'ro',... */
50 unsigned int reserved0; /* reserved for further use ,... */
51 unsigned int reserved1; /* reserved for further use ,... */
52 unsigned int reserved2; /* reserved for further use ,... */
53 unsigned int reserved3; /* reserved for further use ,... */
54 unsigned int reserved4; /* reserved for further use ,... */
55 unsigned int reserved5; /* reserved for further use ,... */
56 unsigned int reserved6; /* reserved for further use ,... */
57 unsigned int reserved7; /* reserved for further use ,... */
58} dasd_information2_t;
59
60/*
61 * values to be used for dasd_information_t.format
62 * 0x00: NOT formatted
63 * 0x01: Linux disc layout
64 * 0x02: Common disc layout
65 */
66#define DASD_FORMAT_NONE 0
67#define DASD_FORMAT_LDL 1
68#define DASD_FORMAT_CDL 2
69/*
70 * values to be used for dasd_information_t.features
71 * 0x00: default features
72 * 0x01: readonly (ro)
73 * 0x02: use diag discipline (diag)
74 * 0x04: set the device initially online (internal use only)
75 * 0x08: enable ERP related logging
76 * 0x20: give access to raw eckd data
77 */
78#define DASD_FEATURE_DEFAULT 0x00
79#define DASD_FEATURE_READONLY 0x01
80#define DASD_FEATURE_USEDIAG 0x02
81#define DASD_FEATURE_INITIAL_ONLINE 0x04
82#define DASD_FEATURE_ERPLOG 0x08
83#define DASD_FEATURE_FAILFAST 0x10
84#define DASD_FEATURE_FAILONSLCK 0x20
85#define DASD_FEATURE_USERAW 0x40
86
87#define DASD_PARTN_BITS 2
88
89/*
90 * struct dasd_information_t
91 * represents any data about the data, which is visible to userspace
92 */
93typedef struct dasd_information_t {
94 unsigned int devno; /* S/390 devno */
95 unsigned int real_devno; /* for aliases */
96 unsigned int schid; /* S/390 subchannel identifier */
97 unsigned int cu_type : 16; /* from SenseID */
98 unsigned int cu_model : 8; /* from SenseID */
99 unsigned int dev_type : 16; /* from SenseID */
100 unsigned int dev_model : 8; /* from SenseID */
101 unsigned int open_count;
102 unsigned int req_queue_len;
103 unsigned int chanq_len; /* length of chanq */
104 char type[4]; /* from discipline.name, 'none' for unknown */
105 unsigned int status; /* current device level */
106 unsigned int label_block; /* where to find the VOLSER */
107 unsigned int FBA_layout; /* fixed block size (like AIXVOL) */
108 unsigned int characteristics_size;
109 unsigned int confdata_size;
110 char characteristics[64]; /* from read_device_characteristics */
111 char configuration_data[256]; /* from read_configuration_data */
112} dasd_information_t;
113
114/*
115 * Read Subsystem Data - Performance Statistics
116 */
117typedef struct dasd_rssd_perf_stats_t {
118 unsigned char invalid:1;
119 unsigned char format:3;
120 unsigned char data_format:4;
121 unsigned char unit_address;
122 unsigned short device_status;
123 unsigned int nr_read_normal;
124 unsigned int nr_read_normal_hits;
125 unsigned int nr_write_normal;
126 unsigned int nr_write_fast_normal_hits;
127 unsigned int nr_read_seq;
128 unsigned int nr_read_seq_hits;
129 unsigned int nr_write_seq;
130 unsigned int nr_write_fast_seq_hits;
131 unsigned int nr_read_cache;
132 unsigned int nr_read_cache_hits;
133 unsigned int nr_write_cache;
134 unsigned int nr_write_fast_cache_hits;
135 unsigned int nr_inhibit_cache;
136 unsigned int nr_bybass_cache;
137 unsigned int nr_seq_dasd_to_cache;
138 unsigned int nr_dasd_to_cache;
139 unsigned int nr_cache_to_dasd;
140 unsigned int nr_delayed_fast_write;
141 unsigned int nr_normal_fast_write;
142 unsigned int nr_seq_fast_write;
143 unsigned int nr_cache_miss;
144 unsigned char status2;
145 unsigned int nr_quick_write_promotes;
146 unsigned char reserved;
147 unsigned short ssid;
148 unsigned char reseved2[96];
149} __attribute__((packed)) dasd_rssd_perf_stats_t;
150
151/*
152 * struct profile_info_t
153 * holds the profinling information
154 */
155typedef struct dasd_profile_info_t {
156 unsigned int dasd_io_reqs; /* number of requests processed at all */
157 unsigned int dasd_io_sects; /* number of sectors processed at all */
158 unsigned int dasd_io_secs[32]; /* histogram of request's sizes */
159 unsigned int dasd_io_times[32]; /* histogram of requests's times */
160 unsigned int dasd_io_timps[32]; /* histogram of requests's times per sector */
161 unsigned int dasd_io_time1[32]; /* histogram of time from build to start */
162 unsigned int dasd_io_time2[32]; /* histogram of time from start to irq */
163 unsigned int dasd_io_time2ps[32]; /* histogram of time from start to irq */
164 unsigned int dasd_io_time3[32]; /* histogram of time from irq to end */
165 unsigned int dasd_io_nr_req[32]; /* histogram of # of requests in chanq */
166} dasd_profile_info_t;
167
168/*
169 * struct format_data_t
170 * represents all data necessary to format a dasd
171 */
172typedef struct format_data_t {
173 unsigned int start_unit; /* from track */
174 unsigned int stop_unit; /* to track */
175 unsigned int blksize; /* sectorsize */
176 unsigned int intensity;
177} format_data_t;
178
179/*
180 * values to be used for format_data_t.intensity
181 * 0/8: normal format
182 * 1/9: also write record zero
183 * 3/11: also write home address
184 * 4/12: invalidate track
185 */
186#define DASD_FMT_INT_FMT_R0 1 /* write record zero */
187#define DASD_FMT_INT_FMT_HA 2 /* write home address, also set FMT_R0 ! */
188#define DASD_FMT_INT_INVAL 4 /* invalidate tracks */
189#define DASD_FMT_INT_COMPAT 8 /* use OS/390 compatible disk layout */
190
191
192/*
193 * struct attrib_data_t
194 * represents the operation (cache) bits for the device.
195 * Used in DE to influence caching of the DASD.
196 */
197typedef struct attrib_data_t {
198 unsigned char operation:3; /* cache operation mode */
199 unsigned char reserved:5; /* cache operation mode */
200 __u16 nr_cyl; /* no of cyliners for read ahaed */
201 __u8 reserved2[29]; /* for future use */
202} __attribute__ ((packed)) attrib_data_t;
203
204/* definition of operation (cache) bits within attributes of DE */
205#define DASD_NORMAL_CACHE 0x0
206#define DASD_BYPASS_CACHE 0x1
207#define DASD_INHIBIT_LOAD 0x2
208#define DASD_SEQ_ACCESS 0x3
209#define DASD_SEQ_PRESTAGE 0x4
210#define DASD_REC_ACCESS 0x5
211
212/*
213 * Perform EMC Symmetrix I/O
214 */
215typedef struct dasd_symmio_parms {
216 unsigned char reserved[8]; /* compat with older releases */
217 unsigned long long psf_data; /* char * cast to u64 */
218 unsigned long long rssd_result; /* char * cast to u64 */
219 int psf_data_len;
220 int rssd_result_len;
221} __attribute__ ((packed)) dasd_symmio_parms_t;
222
223/*
224 * Data returned by Sense Path Group ID (SNID)
225 */
226struct dasd_snid_data {
227 struct {
228 __u8 group:2;
229 __u8 reserve:2;
230 __u8 mode:1;
231 __u8 res:3;
232 } __attribute__ ((packed)) path_state;
233 __u8 pgid[11];
234} __attribute__ ((packed));
235
236struct dasd_snid_ioctl_data {
237 struct dasd_snid_data data;
238 __u8 path_mask;
239} __attribute__ ((packed));
240
241
242/********************************************************************************
243 * SECTION: Definition of IOCTLs
244 *
245 * Here ist how the ioctl-nr should be used:
246 * 0 - 31 DASD driver itself
247 * 32 - 239 still open
248 * 240 - 255 reserved for EMC
249 *******************************************************************************/
250
251/* Disable the volume (for Linux) */
252#define BIODASDDISABLE _IO(DASD_IOCTL_LETTER,0)
253/* Enable the volume (for Linux) */
254#define BIODASDENABLE _IO(DASD_IOCTL_LETTER,1)
255/* Issue a reserve/release command, rsp. */
256#define BIODASDRSRV _IO(DASD_IOCTL_LETTER,2) /* reserve */
257#define BIODASDRLSE _IO(DASD_IOCTL_LETTER,3) /* release */
258#define BIODASDSLCK _IO(DASD_IOCTL_LETTER,4) /* steal lock */
259/* reset profiling information of a device */
260#define BIODASDPRRST _IO(DASD_IOCTL_LETTER,5)
261/* Quiesce IO on device */
262#define BIODASDQUIESCE _IO(DASD_IOCTL_LETTER,6)
263/* Resume IO on device */
264#define BIODASDRESUME _IO(DASD_IOCTL_LETTER,7)
265
266
267/* retrieve API version number */
268#define DASDAPIVER _IOR(DASD_IOCTL_LETTER,0,int)
269/* Get information on a dasd device */
270#define BIODASDINFO _IOR(DASD_IOCTL_LETTER,1,dasd_information_t)
271/* retrieve profiling information of a device */
272#define BIODASDPRRD _IOR(DASD_IOCTL_LETTER,2,dasd_profile_info_t)
273/* Get information on a dasd device (enhanced) */
274#define BIODASDINFO2 _IOR(DASD_IOCTL_LETTER,3,dasd_information2_t)
275/* Performance Statistics Read */
276#define BIODASDPSRD _IOR(DASD_IOCTL_LETTER,4,dasd_rssd_perf_stats_t)
277/* Get Attributes (cache operations) */
278#define BIODASDGATTR _IOR(DASD_IOCTL_LETTER,5,attrib_data_t)
279
280
281/* #define BIODASDFORMAT _IOW(IOCTL_LETTER,0,format_data_t) , deprecated */
282#define BIODASDFMT _IOW(DASD_IOCTL_LETTER,1,format_data_t)
283/* Set Attributes (cache operations) */
284#define BIODASDSATTR _IOW(DASD_IOCTL_LETTER,2,attrib_data_t)
285
286/* Get Sense Path Group ID (SNID) data */
287#define BIODASDSNID _IOWR(DASD_IOCTL_LETTER, 1, struct dasd_snid_ioctl_data)
288
289#define BIODASDSYMMIO _IOWR(DASD_IOCTL_LETTER, 240, dasd_symmio_parms_t)
290
291#endif /* DASD_H */
292
diff --git a/arch/s390/include/asm/errno.h b/arch/s390/include/asm/errno.h
new file mode 100644
index 00000000000..e41d5b37c4d
--- /dev/null
+++ b/arch/s390/include/asm/errno.h
@@ -0,0 +1,13 @@
1/*
2 * include/asm-s390/errno.h
3 *
4 * S390 version
5 *
6 */
7
8#ifndef _S390_ERRNO_H
9#define _S390_ERRNO_H
10
11#include <asm-generic/errno.h>
12
13#endif
diff --git a/arch/s390/include/asm/fcntl.h b/arch/s390/include/asm/fcntl.h
new file mode 100644
index 00000000000..46ab12db573
--- /dev/null
+++ b/arch/s390/include/asm/fcntl.h
@@ -0,0 +1 @@
#include <asm-generic/fcntl.h>
diff --git a/arch/s390/include/asm/ioctl.h b/arch/s390/include/asm/ioctl.h
new file mode 100644
index 00000000000..b279fe06dfe
--- /dev/null
+++ b/arch/s390/include/asm/ioctl.h
@@ -0,0 +1 @@
#include <asm-generic/ioctl.h>
diff --git a/arch/s390/include/asm/ioctls.h b/arch/s390/include/asm/ioctls.h
new file mode 100644
index 00000000000..960a4c1ebdf
--- /dev/null
+++ b/arch/s390/include/asm/ioctls.h
@@ -0,0 +1,8 @@
1#ifndef __ARCH_S390_IOCTLS_H__
2#define __ARCH_S390_IOCTLS_H__
3
4#define FIOQSIZE 0x545E
5
6#include <asm-generic/ioctls.h>
7
8#endif
diff --git a/arch/s390/include/asm/ipcbuf.h b/arch/s390/include/asm/ipcbuf.h
new file mode 100644
index 00000000000..37f293d12c8
--- /dev/null
+++ b/arch/s390/include/asm/ipcbuf.h
@@ -0,0 +1,31 @@
1#ifndef __S390_IPCBUF_H__
2#define __S390_IPCBUF_H__
3
4/*
5 * The user_ipc_perm structure for S/390 architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 32-bit mode_t and seq
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct ipc64_perm
15{
16 __kernel_key_t key;
17 __kernel_uid32_t uid;
18 __kernel_gid32_t gid;
19 __kernel_uid32_t cuid;
20 __kernel_gid32_t cgid;
21 __kernel_mode_t mode;
22 unsigned short __pad1;
23 unsigned short seq;
24#ifndef __s390x__
25 unsigned short __pad2;
26#endif /* ! __s390x__ */
27 unsigned long __unused1;
28 unsigned long __unused2;
29};
30
31#endif /* __S390_IPCBUF_H__ */
diff --git a/arch/s390/include/asm/kvm.h b/arch/s390/include/asm/kvm.h
new file mode 100644
index 00000000000..82b32a100c7
--- /dev/null
+++ b/arch/s390/include/asm/kvm.h
@@ -0,0 +1,44 @@
1#ifndef __LINUX_KVM_S390_H
2#define __LINUX_KVM_S390_H
3/*
4 * asm-s390/kvm.h - KVM s390 specific structures and definitions
5 *
6 * Copyright IBM Corp. 2008
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License (version 2 only)
10 * as published by the Free Software Foundation.
11 *
12 * Author(s): Carsten Otte <cotte@de.ibm.com>
13 * Christian Borntraeger <borntraeger@de.ibm.com>
14 */
15#include <linux/types.h>
16
17#define __KVM_S390
18
19/* for KVM_GET_REGS and KVM_SET_REGS */
20struct kvm_regs {
21 /* general purpose regs for s390 */
22 __u64 gprs[16];
23};
24
25/* for KVM_GET_SREGS and KVM_SET_SREGS */
26struct kvm_sregs {
27 __u32 acrs[16];
28 __u64 crs[16];
29};
30
31/* for KVM_GET_FPU and KVM_SET_FPU */
32struct kvm_fpu {
33 __u32 fpc;
34 __u64 fprs[16];
35};
36
37struct kvm_debug_exit_arch {
38};
39
40/* for KVM_SET_GUEST_DEBUG */
41struct kvm_guest_debug_arch {
42};
43
44#endif
diff --git a/arch/s390/include/asm/kvm_virtio.h b/arch/s390/include/asm/kvm_virtio.h
new file mode 100644
index 00000000000..72f614181ef
--- /dev/null
+++ b/arch/s390/include/asm/kvm_virtio.h
@@ -0,0 +1,64 @@
1/*
2 * kvm_virtio.h - definition for virtio for kvm on s390
3 *
4 * Copyright IBM Corp. 2008
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License (version 2 only)
8 * as published by the Free Software Foundation.
9 *
10 * Author(s): Christian Borntraeger <borntraeger@de.ibm.com>
11 */
12
13#ifndef __KVM_S390_VIRTIO_H
14#define __KVM_S390_VIRTIO_H
15
16#include <linux/types.h>
17
18struct kvm_device_desc {
19 /* The device type: console, network, disk etc. Type 0 terminates. */
20 __u8 type;
21 /* The number of virtqueues (first in config array) */
22 __u8 num_vq;
23 /*
24 * The number of bytes of feature bits. Multiply by 2: one for host
25 * features and one for guest acknowledgements.
26 */
27 __u8 feature_len;
28 /* The number of bytes of the config array after virtqueues. */
29 __u8 config_len;
30 /* A status byte, written by the Guest. */
31 __u8 status;
32 __u8 config[0];
33};
34
35/*
36 * This is how we expect the device configuration field for a virtqueue
37 * to be laid out in config space.
38 */
39struct kvm_vqconfig {
40 /* The token returned with an interrupt. Set by the guest */
41 __u64 token;
42 /* The address of the virtio ring */
43 __u64 address;
44 /* The number of entries in the virtio_ring */
45 __u16 num;
46
47};
48
49#define KVM_S390_VIRTIO_NOTIFY 0
50#define KVM_S390_VIRTIO_RESET 1
51#define KVM_S390_VIRTIO_SET_STATUS 2
52
53/* The alignment to use between consumer and producer parts of vring.
54 * This is pagesize for historical reasons. */
55#define KVM_S390_VIRTIO_RING_ALIGN 4096
56
57
58/* These values are supposed to be in ext_params on an interrupt */
59#define VIRTIO_PARAM_MASK 0xff
60#define VIRTIO_PARAM_VRING_INTERRUPT 0x0
61#define VIRTIO_PARAM_CONFIG_CHANGED 0x1
62#define VIRTIO_PARAM_DEV_ADD 0x2
63
64#endif
diff --git a/arch/s390/include/asm/monwriter.h b/arch/s390/include/asm/monwriter.h
new file mode 100644
index 00000000000..f0cbf96c52e
--- /dev/null
+++ b/arch/s390/include/asm/monwriter.h
@@ -0,0 +1,33 @@
1/*
2 * include/asm-s390/monwriter.h
3 *
4 * Copyright (C) IBM Corp. 2006
5 * Character device driver for writing z/VM APPLDATA monitor records
6 * Version 1.0
7 * Author(s): Melissa Howland <melissah@us.ibm.com>
8 *
9 */
10
11#ifndef _ASM_390_MONWRITER_H
12#define _ASM_390_MONWRITER_H
13
14/* mon_function values */
15#define MONWRITE_START_INTERVAL 0x00 /* start interval recording */
16#define MONWRITE_STOP_INTERVAL 0x01 /* stop interval or config recording */
17#define MONWRITE_GEN_EVENT 0x02 /* generate event record */
18#define MONWRITE_START_CONFIG 0x03 /* start configuration recording */
19
20/* the header the app uses in its write() data */
21struct monwrite_hdr {
22 unsigned char mon_function;
23 unsigned short applid;
24 unsigned char record_num;
25 unsigned short version;
26 unsigned short release;
27 unsigned short mod_level;
28 unsigned short datalen;
29 unsigned char hdrlen;
30
31} __attribute__((packed));
32
33#endif /* _ASM_390_MONWRITER_H */
diff --git a/arch/s390/include/asm/msgbuf.h b/arch/s390/include/asm/msgbuf.h
new file mode 100644
index 00000000000..1bbdee92792
--- /dev/null
+++ b/arch/s390/include/asm/msgbuf.h
@@ -0,0 +1,37 @@
1#ifndef _S390_MSGBUF_H
2#define _S390_MSGBUF_H
3
4/*
5 * The msqid64_ds structure for S/390 architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct msqid64_ds {
15 struct ipc64_perm msg_perm;
16 __kernel_time_t msg_stime; /* last msgsnd time */
17#ifndef __s390x__
18 unsigned long __unused1;
19#endif /* ! __s390x__ */
20 __kernel_time_t msg_rtime; /* last msgrcv time */
21#ifndef __s390x__
22 unsigned long __unused2;
23#endif /* ! __s390x__ */
24 __kernel_time_t msg_ctime; /* last change time */
25#ifndef __s390x__
26 unsigned long __unused3;
27#endif /* ! __s390x__ */
28 unsigned long msg_cbytes; /* current number of bytes on queue */
29 unsigned long msg_qnum; /* number of messages in queue */
30 unsigned long msg_qbytes; /* max number of bytes on queue */
31 __kernel_pid_t msg_lspid; /* pid of last msgsnd */
32 __kernel_pid_t msg_lrpid; /* last receive pid */
33 unsigned long __unused4;
34 unsigned long __unused5;
35};
36
37#endif /* _S390_MSGBUF_H */
diff --git a/arch/s390/include/asm/param.h b/arch/s390/include/asm/param.h
new file mode 100644
index 00000000000..c616821bf2a
--- /dev/null
+++ b/arch/s390/include/asm/param.h
@@ -0,0 +1,6 @@
1#ifndef _ASMS390_PARAM_H
2#define _ASMS390_PARAM_H
3
4#include <asm-generic/param.h>
5
6#endif /* _ASMS390_PARAM_H */
diff --git a/arch/s390/include/asm/poll.h b/arch/s390/include/asm/poll.h
new file mode 100644
index 00000000000..c98509d3149
--- /dev/null
+++ b/arch/s390/include/asm/poll.h
@@ -0,0 +1 @@
#include <asm-generic/poll.h>
diff --git a/arch/s390/include/asm/posix_types.h b/arch/s390/include/asm/posix_types.h
new file mode 100644
index 00000000000..8cc113f9252
--- /dev/null
+++ b/arch/s390/include/asm/posix_types.h
@@ -0,0 +1,107 @@
1/*
2 * include/asm-s390/posix_types.h
3 *
4 * S390 version
5 *
6 * Derived from "include/asm-i386/posix_types.h"
7 */
8
9#ifndef __ARCH_S390_POSIX_TYPES_H
10#define __ARCH_S390_POSIX_TYPES_H
11
12/*
13 * This file is generally used by user-level software, so you need to
14 * be a little careful about namespace pollution etc. Also, we cannot
15 * assume GCC is being used.
16 */
17
18typedef long __kernel_off_t;
19typedef int __kernel_pid_t;
20typedef unsigned long __kernel_size_t;
21typedef long __kernel_time_t;
22typedef long __kernel_suseconds_t;
23typedef long __kernel_clock_t;
24typedef int __kernel_timer_t;
25typedef int __kernel_clockid_t;
26typedef int __kernel_daddr_t;
27typedef char * __kernel_caddr_t;
28typedef unsigned short __kernel_uid16_t;
29typedef unsigned short __kernel_gid16_t;
30
31#ifdef __GNUC__
32typedef long long __kernel_loff_t;
33#endif
34
35#ifndef __s390x__
36
37typedef unsigned long __kernel_ino_t;
38typedef unsigned short __kernel_mode_t;
39typedef unsigned short __kernel_nlink_t;
40typedef unsigned short __kernel_ipc_pid_t;
41typedef unsigned short __kernel_uid_t;
42typedef unsigned short __kernel_gid_t;
43typedef int __kernel_ssize_t;
44typedef int __kernel_ptrdiff_t;
45typedef unsigned int __kernel_uid32_t;
46typedef unsigned int __kernel_gid32_t;
47typedef unsigned short __kernel_old_uid_t;
48typedef unsigned short __kernel_old_gid_t;
49typedef unsigned short __kernel_old_dev_t;
50
51#else /* __s390x__ */
52
53typedef unsigned int __kernel_ino_t;
54typedef unsigned int __kernel_mode_t;
55typedef unsigned int __kernel_nlink_t;
56typedef int __kernel_ipc_pid_t;
57typedef unsigned int __kernel_uid_t;
58typedef unsigned int __kernel_gid_t;
59typedef long __kernel_ssize_t;
60typedef long __kernel_ptrdiff_t;
61typedef unsigned long __kernel_sigset_t; /* at least 32 bits */
62typedef __kernel_uid_t __kernel_old_uid_t;
63typedef __kernel_gid_t __kernel_old_gid_t;
64typedef __kernel_uid_t __kernel_uid32_t;
65typedef __kernel_gid_t __kernel_gid32_t;
66typedef unsigned short __kernel_old_dev_t;
67
68#endif /* __s390x__ */
69
70typedef struct {
71 int val[2];
72} __kernel_fsid_t;
73
74
75#ifdef __KERNEL__
76
77#undef __FD_SET
78static inline void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp)
79{
80 unsigned long _tmp = fd / __NFDBITS;
81 unsigned long _rem = fd % __NFDBITS;
82 fdsetp->fds_bits[_tmp] |= (1UL<<_rem);
83}
84
85#undef __FD_CLR
86static inline void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp)
87{
88 unsigned long _tmp = fd / __NFDBITS;
89 unsigned long _rem = fd % __NFDBITS;
90 fdsetp->fds_bits[_tmp] &= ~(1UL<<_rem);
91}
92
93#undef __FD_ISSET
94static inline int __FD_ISSET(unsigned long fd, const __kernel_fd_set *fdsetp)
95{
96 unsigned long _tmp = fd / __NFDBITS;
97 unsigned long _rem = fd % __NFDBITS;
98 return (fdsetp->fds_bits[_tmp] & (1UL<<_rem)) != 0;
99}
100
101#undef __FD_ZERO
102#define __FD_ZERO(fdsetp) \
103 ((void) memset ((void *) (fdsetp), 0, sizeof (__kernel_fd_set)))
104
105#endif /* __KERNEL__ */
106
107#endif
diff --git a/arch/s390/include/asm/qeth.h b/arch/s390/include/asm/qeth.h
new file mode 100644
index 00000000000..90efda0b137
--- /dev/null
+++ b/arch/s390/include/asm/qeth.h
@@ -0,0 +1,110 @@
1/*
2 * include/asm-s390/qeth.h
3 *
4 * ioctl definitions for qeth driver
5 *
6 * Copyright (C) 2004 IBM Corporation
7 *
8 * Author(s): Thomas Spatzier <tspat@de.ibm.com>
9 *
10 */
11#ifndef __ASM_S390_QETH_IOCTL_H__
12#define __ASM_S390_QETH_IOCTL_H__
13#include <linux/types.h>
14#include <linux/ioctl.h>
15
16#define SIOC_QETH_ARP_SET_NO_ENTRIES (SIOCDEVPRIVATE)
17#define SIOC_QETH_ARP_QUERY_INFO (SIOCDEVPRIVATE + 1)
18#define SIOC_QETH_ARP_ADD_ENTRY (SIOCDEVPRIVATE + 2)
19#define SIOC_QETH_ARP_REMOVE_ENTRY (SIOCDEVPRIVATE + 3)
20#define SIOC_QETH_ARP_FLUSH_CACHE (SIOCDEVPRIVATE + 4)
21#define SIOC_QETH_ADP_SET_SNMP_CONTROL (SIOCDEVPRIVATE + 5)
22#define SIOC_QETH_GET_CARD_TYPE (SIOCDEVPRIVATE + 6)
23
24struct qeth_arp_cache_entry {
25 __u8 macaddr[6];
26 __u8 reserved1[2];
27 __u8 ipaddr[16]; /* for both IPv4 and IPv6 */
28 __u8 reserved2[32];
29} __attribute__ ((packed));
30
31enum qeth_arp_ipaddrtype {
32 QETHARP_IP_ADDR_V4 = 1,
33 QETHARP_IP_ADDR_V6 = 2,
34};
35struct qeth_arp_entrytype {
36 __u8 mac;
37 __u8 ip;
38} __attribute__((packed));
39
40#define QETH_QARP_MEDIASPECIFIC_BYTES 32
41#define QETH_QARP_MACADDRTYPE_BYTES 1
42struct qeth_arp_qi_entry7 {
43 __u8 media_specific[QETH_QARP_MEDIASPECIFIC_BYTES];
44 struct qeth_arp_entrytype type;
45 __u8 macaddr[6];
46 __u8 ipaddr[4];
47} __attribute__((packed));
48
49struct qeth_arp_qi_entry7_ipv6 {
50 __u8 media_specific[QETH_QARP_MEDIASPECIFIC_BYTES];
51 struct qeth_arp_entrytype type;
52 __u8 macaddr[6];
53 __u8 ipaddr[16];
54} __attribute__((packed));
55
56struct qeth_arp_qi_entry7_short {
57 struct qeth_arp_entrytype type;
58 __u8 macaddr[6];
59 __u8 ipaddr[4];
60} __attribute__((packed));
61
62struct qeth_arp_qi_entry7_short_ipv6 {
63 struct qeth_arp_entrytype type;
64 __u8 macaddr[6];
65 __u8 ipaddr[16];
66} __attribute__((packed));
67
68struct qeth_arp_qi_entry5 {
69 __u8 media_specific[QETH_QARP_MEDIASPECIFIC_BYTES];
70 struct qeth_arp_entrytype type;
71 __u8 ipaddr[4];
72} __attribute__((packed));
73
74struct qeth_arp_qi_entry5_ipv6 {
75 __u8 media_specific[QETH_QARP_MEDIASPECIFIC_BYTES];
76 struct qeth_arp_entrytype type;
77 __u8 ipaddr[16];
78} __attribute__((packed));
79
80struct qeth_arp_qi_entry5_short {
81 struct qeth_arp_entrytype type;
82 __u8 ipaddr[4];
83} __attribute__((packed));
84
85struct qeth_arp_qi_entry5_short_ipv6 {
86 struct qeth_arp_entrytype type;
87 __u8 ipaddr[16];
88} __attribute__((packed));
89/*
90 * can be set by user if no "media specific information" is wanted
91 * -> saves a lot of space in user space buffer
92 */
93#define QETH_QARP_STRIP_ENTRIES 0x8000
94#define QETH_QARP_WITH_IPV6 0x4000
95#define QETH_QARP_REQUEST_MASK 0x00ff
96
97/* data sent to user space as result of query arp ioctl */
98#define QETH_QARP_USER_DATA_SIZE 20000
99#define QETH_QARP_MASK_OFFSET 4
100#define QETH_QARP_ENTRIES_OFFSET 6
101struct qeth_arp_query_user_data {
102 union {
103 __u32 data_len; /* set by user space program */
104 __u32 no_entries; /* set by kernel */
105 } u;
106 __u16 mask_bits;
107 char *entries;
108} __attribute__((packed));
109
110#endif /* __ASM_S390_QETH_IOCTL_H__ */
diff --git a/arch/s390/include/asm/resource.h b/arch/s390/include/asm/resource.h
new file mode 100644
index 00000000000..366c01de04f
--- /dev/null
+++ b/arch/s390/include/asm/resource.h
@@ -0,0 +1,15 @@
1/*
2 * include/asm-s390/resource.h
3 *
4 * S390 version
5 *
6 * Derived from "include/asm-i386/resources.h"
7 */
8
9#ifndef _S390_RESOURCE_H
10#define _S390_RESOURCE_H
11
12#include <asm-generic/resource.h>
13
14#endif
15
diff --git a/arch/s390/include/asm/sembuf.h b/arch/s390/include/asm/sembuf.h
new file mode 100644
index 00000000000..32626b0cac4
--- /dev/null
+++ b/arch/s390/include/asm/sembuf.h
@@ -0,0 +1,29 @@
1#ifndef _S390_SEMBUF_H
2#define _S390_SEMBUF_H
3
4/*
5 * The semid64_ds structure for S/390 architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem (for !__s390x__)
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct semid64_ds {
15 struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
16 __kernel_time_t sem_otime; /* last semop time */
17#ifndef __s390x__
18 unsigned long __unused1;
19#endif /* ! __s390x__ */
20 __kernel_time_t sem_ctime; /* last change time */
21#ifndef __s390x__
22 unsigned long __unused2;
23#endif /* ! __s390x__ */
24 unsigned long sem_nsems; /* no. of semaphores in array */
25 unsigned long __unused3;
26 unsigned long __unused4;
27};
28
29#endif /* _S390_SEMBUF_H */
diff --git a/arch/s390/include/asm/shmbuf.h b/arch/s390/include/asm/shmbuf.h
new file mode 100644
index 00000000000..eed2e280ce3
--- /dev/null
+++ b/arch/s390/include/asm/shmbuf.h
@@ -0,0 +1,48 @@
1#ifndef _S390_SHMBUF_H
2#define _S390_SHMBUF_H
3
4/*
5 * The shmid64_ds structure for S/390 architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem (for !__s390x__)
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct shmid64_ds {
15 struct ipc64_perm shm_perm; /* operation perms */
16 size_t shm_segsz; /* size of segment (bytes) */
17 __kernel_time_t shm_atime; /* last attach time */
18#ifndef __s390x__
19 unsigned long __unused1;
20#endif /* ! __s390x__ */
21 __kernel_time_t shm_dtime; /* last detach time */
22#ifndef __s390x__
23 unsigned long __unused2;
24#endif /* ! __s390x__ */
25 __kernel_time_t shm_ctime; /* last change time */
26#ifndef __s390x__
27 unsigned long __unused3;
28#endif /* ! __s390x__ */
29 __kernel_pid_t shm_cpid; /* pid of creator */
30 __kernel_pid_t shm_lpid; /* pid of last operator */
31 unsigned long shm_nattch; /* no. of current attaches */
32 unsigned long __unused4;
33 unsigned long __unused5;
34};
35
36struct shminfo64 {
37 unsigned long shmmax;
38 unsigned long shmmin;
39 unsigned long shmmni;
40 unsigned long shmseg;
41 unsigned long shmall;
42 unsigned long __unused1;
43 unsigned long __unused2;
44 unsigned long __unused3;
45 unsigned long __unused4;
46};
47
48#endif /* _S390_SHMBUF_H */
diff --git a/arch/s390/include/asm/sigcontext.h b/arch/s390/include/asm/sigcontext.h
new file mode 100644
index 00000000000..aeb6e0b1332
--- /dev/null
+++ b/arch/s390/include/asm/sigcontext.h
@@ -0,0 +1,71 @@
1/*
2 * include/asm-s390/sigcontext.h
3 *
4 * S390 version
5 * Copyright (C) 1999,2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
6 */
7
8#ifndef _ASM_S390_SIGCONTEXT_H
9#define _ASM_S390_SIGCONTEXT_H
10
11#include <linux/compiler.h>
12
13#define __NUM_GPRS 16
14#define __NUM_FPRS 16
15#define __NUM_ACRS 16
16
17#ifndef __s390x__
18
19/* Has to be at least _NSIG_WORDS from asm/signal.h */
20#define _SIGCONTEXT_NSIG 64
21#define _SIGCONTEXT_NSIG_BPW 32
22/* Size of stack frame allocated when calling signal handler. */
23#define __SIGNAL_FRAMESIZE 96
24
25#else /* __s390x__ */
26
27/* Has to be at least _NSIG_WORDS from asm/signal.h */
28#define _SIGCONTEXT_NSIG 64
29#define _SIGCONTEXT_NSIG_BPW 64
30/* Size of stack frame allocated when calling signal handler. */
31#define __SIGNAL_FRAMESIZE 160
32
33#endif /* __s390x__ */
34
35#define _SIGCONTEXT_NSIG_WORDS (_SIGCONTEXT_NSIG / _SIGCONTEXT_NSIG_BPW)
36#define _SIGMASK_COPY_SIZE (sizeof(unsigned long)*_SIGCONTEXT_NSIG_WORDS)
37
38typedef struct
39{
40 unsigned long mask;
41 unsigned long addr;
42} __attribute__ ((aligned(8))) _psw_t;
43
44typedef struct
45{
46 _psw_t psw;
47 unsigned long gprs[__NUM_GPRS];
48 unsigned int acrs[__NUM_ACRS];
49} _s390_regs_common;
50
51typedef struct
52{
53 unsigned int fpc;
54 double fprs[__NUM_FPRS];
55} _s390_fp_regs;
56
57typedef struct
58{
59 _s390_regs_common regs;
60 _s390_fp_regs fpregs;
61} _sigregs;
62
63struct sigcontext
64{
65 unsigned long oldmask[_SIGCONTEXT_NSIG_WORDS];
66 _sigregs __user *sregs;
67};
68
69
70#endif
71
diff --git a/arch/s390/include/asm/siginfo.h b/arch/s390/include/asm/siginfo.h
new file mode 100644
index 00000000000..e0ff1ab054b
--- /dev/null
+++ b/arch/s390/include/asm/siginfo.h
@@ -0,0 +1,18 @@
1/*
2 * include/asm-s390/siginfo.h
3 *
4 * S390 version
5 *
6 * Derived from "include/asm-i386/siginfo.h"
7 */
8
9#ifndef _S390_SIGINFO_H
10#define _S390_SIGINFO_H
11
12#ifdef __s390x__
13#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
14#endif
15
16#include <asm-generic/siginfo.h>
17
18#endif
diff --git a/arch/s390/include/asm/socket.h b/arch/s390/include/asm/socket.h
new file mode 100644
index 00000000000..fdff1e995c7
--- /dev/null
+++ b/arch/s390/include/asm/socket.h
@@ -0,0 +1,73 @@
1/*
2 * include/asm-s390/socket.h
3 *
4 * S390 version
5 *
6 * Derived from "include/asm-i386/socket.h"
7 */
8
9#ifndef _ASM_SOCKET_H
10#define _ASM_SOCKET_H
11
12#include <asm/sockios.h>
13
14/* For setsockopt(2) */
15#define SOL_SOCKET 1
16
17#define SO_DEBUG 1
18#define SO_REUSEADDR 2
19#define SO_TYPE 3
20#define SO_ERROR 4
21#define SO_DONTROUTE 5
22#define SO_BROADCAST 6
23#define SO_SNDBUF 7
24#define SO_RCVBUF 8
25#define SO_SNDBUFFORCE 32
26#define SO_RCVBUFFORCE 33
27#define SO_KEEPALIVE 9
28#define SO_OOBINLINE 10
29#define SO_NO_CHECK 11
30#define SO_PRIORITY 12
31#define SO_LINGER 13
32#define SO_BSDCOMPAT 14
33/* To add :#define SO_REUSEPORT 15 */
34#define SO_PASSCRED 16
35#define SO_PEERCRED 17
36#define SO_RCVLOWAT 18
37#define SO_SNDLOWAT 19
38#define SO_RCVTIMEO 20
39#define SO_SNDTIMEO 21
40
41/* Security levels - as per NRL IPv6 - don't actually do anything */
42#define SO_SECURITY_AUTHENTICATION 22
43#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
44#define SO_SECURITY_ENCRYPTION_NETWORK 24
45
46#define SO_BINDTODEVICE 25
47
48/* Socket filtering */
49#define SO_ATTACH_FILTER 26
50#define SO_DETACH_FILTER 27
51
52#define SO_PEERNAME 28
53#define SO_TIMESTAMP 29
54#define SCM_TIMESTAMP SO_TIMESTAMP
55
56#define SO_ACCEPTCONN 30
57
58#define SO_PEERSEC 31
59#define SO_PASSSEC 34
60#define SO_TIMESTAMPNS 35
61#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
62
63#define SO_MARK 36
64
65#define SO_TIMESTAMPING 37
66#define SCM_TIMESTAMPING SO_TIMESTAMPING
67
68#define SO_PROTOCOL 38
69#define SO_DOMAIN 39
70
71#define SO_RXQ_OVFL 40
72
73#endif /* _ASM_SOCKET_H */
diff --git a/arch/s390/include/asm/sockios.h b/arch/s390/include/asm/sockios.h
new file mode 100644
index 00000000000..6f60eee7324
--- /dev/null
+++ b/arch/s390/include/asm/sockios.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_S390_SOCKIOS_H
2#define _ASM_S390_SOCKIOS_H
3
4#include <asm-generic/sockios.h>
5
6#endif
diff --git a/arch/s390/include/asm/stat.h b/arch/s390/include/asm/stat.h
new file mode 100644
index 00000000000..d92959eebb6
--- /dev/null
+++ b/arch/s390/include/asm/stat.h
@@ -0,0 +1,105 @@
1/*
2 * include/asm-s390/stat.h
3 *
4 * S390 version
5 *
6 * Derived from "include/asm-i386/stat.h"
7 */
8
9#ifndef _S390_STAT_H
10#define _S390_STAT_H
11
12#ifndef __s390x__
13struct __old_kernel_stat {
14 unsigned short st_dev;
15 unsigned short st_ino;
16 unsigned short st_mode;
17 unsigned short st_nlink;
18 unsigned short st_uid;
19 unsigned short st_gid;
20 unsigned short st_rdev;
21 unsigned long st_size;
22 unsigned long st_atime;
23 unsigned long st_mtime;
24 unsigned long st_ctime;
25};
26
27struct stat {
28 unsigned short st_dev;
29 unsigned short __pad1;
30 unsigned long st_ino;
31 unsigned short st_mode;
32 unsigned short st_nlink;
33 unsigned short st_uid;
34 unsigned short st_gid;
35 unsigned short st_rdev;
36 unsigned short __pad2;
37 unsigned long st_size;
38 unsigned long st_blksize;
39 unsigned long st_blocks;
40 unsigned long st_atime;
41 unsigned long st_atime_nsec;
42 unsigned long st_mtime;
43 unsigned long st_mtime_nsec;
44 unsigned long st_ctime;
45 unsigned long st_ctime_nsec;
46 unsigned long __unused4;
47 unsigned long __unused5;
48};
49
50/* This matches struct stat64 in glibc2.1, hence the absolutely
51 * insane amounts of padding around dev_t's.
52 */
53struct stat64 {
54 unsigned long long st_dev;
55 unsigned int __pad1;
56#define STAT64_HAS_BROKEN_ST_INO 1
57 unsigned long __st_ino;
58 unsigned int st_mode;
59 unsigned int st_nlink;
60 unsigned long st_uid;
61 unsigned long st_gid;
62 unsigned long long st_rdev;
63 unsigned int __pad3;
64 long long st_size;
65 unsigned long st_blksize;
66 unsigned char __pad4[4];
67 unsigned long __pad5; /* future possible st_blocks high bits */
68 unsigned long st_blocks; /* Number 512-byte blocks allocated. */
69 unsigned long st_atime;
70 unsigned long st_atime_nsec;
71 unsigned long st_mtime;
72 unsigned long st_mtime_nsec;
73 unsigned long st_ctime;
74 unsigned long st_ctime_nsec; /* will be high 32 bits of ctime someday */
75 unsigned long long st_ino;
76};
77
78#else /* __s390x__ */
79
80struct stat {
81 unsigned long st_dev;
82 unsigned long st_ino;
83 unsigned long st_nlink;
84 unsigned int st_mode;
85 unsigned int st_uid;
86 unsigned int st_gid;
87 unsigned int __pad1;
88 unsigned long st_rdev;
89 unsigned long st_size;
90 unsigned long st_atime;
91 unsigned long st_atime_nsec;
92 unsigned long st_mtime;
93 unsigned long st_mtime_nsec;
94 unsigned long st_ctime;
95 unsigned long st_ctime_nsec;
96 unsigned long st_blksize;
97 long st_blocks;
98 unsigned long __unused[3];
99};
100
101#endif /* __s390x__ */
102
103#define STAT_HAVE_NSEC 1
104
105#endif
diff --git a/arch/s390/include/asm/statfs.h b/arch/s390/include/asm/statfs.h
new file mode 100644
index 00000000000..3be7fbd406c
--- /dev/null
+++ b/arch/s390/include/asm/statfs.h
@@ -0,0 +1,71 @@
1/*
2 * include/asm-s390/statfs.h
3 *
4 * S390 version
5 *
6 * Derived from "include/asm-i386/statfs.h"
7 */
8
9#ifndef _S390_STATFS_H
10#define _S390_STATFS_H
11
12#ifndef __s390x__
13#include <asm-generic/statfs.h>
14#else
15/*
16 * We can't use <asm-generic/statfs.h> because in 64-bit mode
17 * we mix ints of different sizes in our struct statfs.
18 */
19
20#ifndef __KERNEL_STRICT_NAMES
21#include <linux/types.h>
22typedef __kernel_fsid_t fsid_t;
23#endif
24
25struct statfs {
26 int f_type;
27 int f_bsize;
28 long f_blocks;
29 long f_bfree;
30 long f_bavail;
31 long f_files;
32 long f_ffree;
33 __kernel_fsid_t f_fsid;
34 int f_namelen;
35 int f_frsize;
36 int f_flags;
37 int f_spare[4];
38};
39
40struct statfs64 {
41 int f_type;
42 int f_bsize;
43 long f_blocks;
44 long f_bfree;
45 long f_bavail;
46 long f_files;
47 long f_ffree;
48 __kernel_fsid_t f_fsid;
49 int f_namelen;
50 int f_frsize;
51 int f_flags;
52 int f_spare[4];
53};
54
55struct compat_statfs64 {
56 __u32 f_type;
57 __u32 f_bsize;
58 __u64 f_blocks;
59 __u64 f_bfree;
60 __u64 f_bavail;
61 __u64 f_files;
62 __u64 f_ffree;
63 __kernel_fsid_t f_fsid;
64 __u32 f_namelen;
65 __u32 f_frsize;
66 __u32 f_flags;
67 __u32 f_spare[4];
68};
69
70#endif /* __s390x__ */
71#endif
diff --git a/arch/s390/include/asm/swab.h b/arch/s390/include/asm/swab.h
new file mode 100644
index 00000000000..6bdee21c077
--- /dev/null
+++ b/arch/s390/include/asm/swab.h
@@ -0,0 +1,91 @@
1#ifndef _S390_SWAB_H
2#define _S390_SWAB_H
3
4/*
5 * include/asm-s390/swab.h
6 *
7 * S390 version
8 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
9 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
10 */
11
12#include <linux/types.h>
13
14#ifndef __s390x__
15# define __SWAB_64_THRU_32__
16#endif
17
18#ifdef __s390x__
19static inline __u64 __arch_swab64p(const __u64 *x)
20{
21 __u64 result;
22
23 asm volatile("lrvg %0,%1" : "=d" (result) : "m" (*x));
24 return result;
25}
26#define __arch_swab64p __arch_swab64p
27
28static inline __u64 __arch_swab64(__u64 x)
29{
30 __u64 result;
31
32 asm volatile("lrvgr %0,%1" : "=d" (result) : "d" (x));
33 return result;
34}
35#define __arch_swab64 __arch_swab64
36
37static inline void __arch_swab64s(__u64 *x)
38{
39 *x = __arch_swab64p(x);
40}
41#define __arch_swab64s __arch_swab64s
42#endif /* __s390x__ */
43
44static inline __u32 __arch_swab32p(const __u32 *x)
45{
46 __u32 result;
47
48 asm volatile(
49#ifndef __s390x__
50 " icm %0,8,%O1+3(%R1)\n"
51 " icm %0,4,%O1+2(%R1)\n"
52 " icm %0,2,%O1+1(%R1)\n"
53 " ic %0,%1"
54 : "=&d" (result) : "Q" (*x) : "cc");
55#else /* __s390x__ */
56 " lrv %0,%1"
57 : "=d" (result) : "m" (*x));
58#endif /* __s390x__ */
59 return result;
60}
61#define __arch_swab32p __arch_swab32p
62
63#ifdef __s390x__
64static inline __u32 __arch_swab32(__u32 x)
65{
66 __u32 result;
67
68 asm volatile("lrvr %0,%1" : "=d" (result) : "d" (x));
69 return result;
70}
71#define __arch_swab32 __arch_swab32
72#endif /* __s390x__ */
73
74static inline __u16 __arch_swab16p(const __u16 *x)
75{
76 __u16 result;
77
78 asm volatile(
79#ifndef __s390x__
80 " icm %0,2,%O+1(%R1)\n"
81 " ic %0,%1\n"
82 : "=&d" (result) : "Q" (*x) : "cc");
83#else /* __s390x__ */
84 " lrvh %0,%1"
85 : "=d" (result) : "m" (*x));
86#endif /* __s390x__ */
87 return result;
88}
89#define __arch_swab16p __arch_swab16p
90
91#endif /* _S390_SWAB_H */
diff --git a/arch/s390/include/asm/system.h b/arch/s390/include/asm/system.h
new file mode 100644
index 00000000000..6582f69f238
--- /dev/null
+++ b/arch/s390/include/asm/system.h
@@ -0,0 +1,277 @@
1/*
2 * Copyright IBM Corp. 1999, 2009
3 *
4 * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
5 */
6
7#ifndef __ASM_SYSTEM_H
8#define __ASM_SYSTEM_H
9
10#include <linux/kernel.h>
11#include <linux/errno.h>
12#include <asm/types.h>
13#include <asm/ptrace.h>
14#include <asm/setup.h>
15#include <asm/processor.h>
16#include <asm/lowcore.h>
17#include <asm/cmpxchg.h>
18
19#ifdef __KERNEL__
20
21struct task_struct;
22
23extern struct task_struct *__switch_to(void *, void *);
24extern void update_per_regs(struct task_struct *task);
25
26static inline void save_fp_regs(s390_fp_regs *fpregs)
27{
28 asm volatile(
29 " std 0,%O0+8(%R0)\n"
30 " std 2,%O0+24(%R0)\n"
31 " std 4,%O0+40(%R0)\n"
32 " std 6,%O0+56(%R0)"
33 : "=Q" (*fpregs) : "Q" (*fpregs));
34 if (!MACHINE_HAS_IEEE)
35 return;
36 asm volatile(
37 " stfpc %0\n"
38 " std 1,%O0+16(%R0)\n"
39 " std 3,%O0+32(%R0)\n"
40 " std 5,%O0+48(%R0)\n"
41 " std 7,%O0+64(%R0)\n"
42 " std 8,%O0+72(%R0)\n"
43 " std 9,%O0+80(%R0)\n"
44 " std 10,%O0+88(%R0)\n"
45 " std 11,%O0+96(%R0)\n"
46 " std 12,%O0+104(%R0)\n"
47 " std 13,%O0+112(%R0)\n"
48 " std 14,%O0+120(%R0)\n"
49 " std 15,%O0+128(%R0)\n"
50 : "=Q" (*fpregs) : "Q" (*fpregs));
51}
52
53static inline void restore_fp_regs(s390_fp_regs *fpregs)
54{
55 asm volatile(
56 " ld 0,%O0+8(%R0)\n"
57 " ld 2,%O0+24(%R0)\n"
58 " ld 4,%O0+40(%R0)\n"
59 " ld 6,%O0+56(%R0)"
60 : : "Q" (*fpregs));
61 if (!MACHINE_HAS_IEEE)
62 return;
63 asm volatile(
64 " lfpc %0\n"
65 " ld 1,%O0+16(%R0)\n"
66 " ld 3,%O0+32(%R0)\n"
67 " ld 5,%O0+48(%R0)\n"
68 " ld 7,%O0+64(%R0)\n"
69 " ld 8,%O0+72(%R0)\n"
70 " ld 9,%O0+80(%R0)\n"
71 " ld 10,%O0+88(%R0)\n"
72 " ld 11,%O0+96(%R0)\n"
73 " ld 12,%O0+104(%R0)\n"
74 " ld 13,%O0+112(%R0)\n"
75 " ld 14,%O0+120(%R0)\n"
76 " ld 15,%O0+128(%R0)\n"
77 : : "Q" (*fpregs));
78}
79
80static inline void save_access_regs(unsigned int *acrs)
81{
82 asm volatile("stam 0,15,%0" : "=Q" (*acrs));
83}
84
85static inline void restore_access_regs(unsigned int *acrs)
86{
87 asm volatile("lam 0,15,%0" : : "Q" (*acrs));
88}
89
90#define switch_to(prev,next,last) do { \
91 if (prev->mm) { \
92 save_fp_regs(&prev->thread.fp_regs); \
93 save_access_regs(&prev->thread.acrs[0]); \
94 } \
95 if (next->mm) { \
96 restore_fp_regs(&next->thread.fp_regs); \
97 restore_access_regs(&next->thread.acrs[0]); \
98 update_per_regs(next); \
99 } \
100 prev = __switch_to(prev,next); \
101} while (0)
102
103extern void account_vtime(struct task_struct *, struct task_struct *);
104extern void account_tick_vtime(struct task_struct *);
105
106#ifdef CONFIG_PFAULT
107extern int pfault_init(void);
108extern void pfault_fini(void);
109#else /* CONFIG_PFAULT */
110#define pfault_init() ({-1;})
111#define pfault_fini() do { } while (0)
112#endif /* CONFIG_PFAULT */
113
114extern void cmma_init(void);
115extern int memcpy_real(void *, void *, size_t);
116extern void copy_to_absolute_zero(void *dest, void *src, size_t count);
117
118#define finish_arch_switch(prev) do { \
119 set_fs(current->thread.mm_segment); \
120 account_vtime(prev, current); \
121} while (0)
122
123#define nop() asm volatile("nop")
124
125/*
126 * Force strict CPU ordering.
127 * And yes, this is required on UP too when we're talking
128 * to devices.
129 *
130 * This is very similar to the ppc eieio/sync instruction in that is
131 * does a checkpoint syncronisation & makes sure that
132 * all memory ops have completed wrt other CPU's ( see 7-15 POP DJB ).
133 */
134
135#define eieio() asm volatile("bcr 15,0" : : : "memory")
136#define SYNC_OTHER_CORES(x) eieio()
137#define mb() eieio()
138#define rmb() eieio()
139#define wmb() eieio()
140#define read_barrier_depends() do { } while(0)
141#define smp_mb() mb()
142#define smp_rmb() rmb()
143#define smp_wmb() wmb()
144#define smp_read_barrier_depends() read_barrier_depends()
145#define smp_mb__before_clear_bit() smp_mb()
146#define smp_mb__after_clear_bit() smp_mb()
147
148
149#define set_mb(var, value) do { var = value; mb(); } while (0)
150
151#ifdef __s390x__
152
153#define __ctl_load(array, low, high) ({ \
154 typedef struct { char _[sizeof(array)]; } addrtype; \
155 asm volatile( \
156 " lctlg %1,%2,%0\n" \
157 : : "Q" (*(addrtype *)(&array)), \
158 "i" (low), "i" (high)); \
159 })
160
161#define __ctl_store(array, low, high) ({ \
162 typedef struct { char _[sizeof(array)]; } addrtype; \
163 asm volatile( \
164 " stctg %1,%2,%0\n" \
165 : "=Q" (*(addrtype *)(&array)) \
166 : "i" (low), "i" (high)); \
167 })
168
169#else /* __s390x__ */
170
171#define __ctl_load(array, low, high) ({ \
172 typedef struct { char _[sizeof(array)]; } addrtype; \
173 asm volatile( \
174 " lctl %1,%2,%0\n" \
175 : : "Q" (*(addrtype *)(&array)), \
176 "i" (low), "i" (high)); \
177})
178
179#define __ctl_store(array, low, high) ({ \
180 typedef struct { char _[sizeof(array)]; } addrtype; \
181 asm volatile( \
182 " stctl %1,%2,%0\n" \
183 : "=Q" (*(addrtype *)(&array)) \
184 : "i" (low), "i" (high)); \
185 })
186
187#endif /* __s390x__ */
188
189#define __ctl_set_bit(cr, bit) ({ \
190 unsigned long __dummy; \
191 __ctl_store(__dummy, cr, cr); \
192 __dummy |= 1UL << (bit); \
193 __ctl_load(__dummy, cr, cr); \
194})
195
196#define __ctl_clear_bit(cr, bit) ({ \
197 unsigned long __dummy; \
198 __ctl_store(__dummy, cr, cr); \
199 __dummy &= ~(1UL << (bit)); \
200 __ctl_load(__dummy, cr, cr); \
201})
202
203/*
204 * Use to set psw mask except for the first byte which
205 * won't be changed by this function.
206 */
207static inline void
208__set_psw_mask(unsigned long mask)
209{
210 __load_psw_mask(mask | (arch_local_save_flags() & ~(-1UL >> 8)));
211}
212
213#define local_mcck_enable() __set_psw_mask(psw_kernel_bits)
214#define local_mcck_disable() __set_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK)
215
216#ifdef CONFIG_SMP
217
218extern void smp_ctl_set_bit(int cr, int bit);
219extern void smp_ctl_clear_bit(int cr, int bit);
220#define ctl_set_bit(cr, bit) smp_ctl_set_bit(cr, bit)
221#define ctl_clear_bit(cr, bit) smp_ctl_clear_bit(cr, bit)
222
223#else
224
225#define ctl_set_bit(cr, bit) __ctl_set_bit(cr, bit)
226#define ctl_clear_bit(cr, bit) __ctl_clear_bit(cr, bit)
227
228#endif /* CONFIG_SMP */
229
230#define MAX_FACILITY_BIT (256*8) /* stfle_fac_list has 256 bytes */
231
232/*
233 * The test_facility function uses the bit odering where the MSB is bit 0.
234 * That makes it easier to query facility bits with the bit number as
235 * documented in the Principles of Operation.
236 */
237static inline int test_facility(unsigned long nr)
238{
239 unsigned char *ptr;
240
241 if (nr >= MAX_FACILITY_BIT)
242 return 0;
243 ptr = (unsigned char *) &S390_lowcore.stfle_fac_list + (nr >> 3);
244 return (*ptr & (0x80 >> (nr & 7))) != 0;
245}
246
247static inline unsigned short stap(void)
248{
249 unsigned short cpu_address;
250
251 asm volatile("stap %0" : "=m" (cpu_address));
252 return cpu_address;
253}
254
255extern void (*_machine_restart)(char *command);
256extern void (*_machine_halt)(void);
257extern void (*_machine_power_off)(void);
258
259extern unsigned long arch_align_stack(unsigned long sp);
260
261static inline int tprot(unsigned long addr)
262{
263 int rc = -EFAULT;
264
265 asm volatile(
266 " tprot 0(%1),0\n"
267 "0: ipm %0\n"
268 " srl %0,28\n"
269 "1:\n"
270 EX_TABLE(0b,1b)
271 : "+d" (rc) : "a" (addr) : "cc");
272 return rc;
273}
274
275#endif /* __KERNEL__ */
276
277#endif
diff --git a/arch/s390/include/asm/tape390.h b/arch/s390/include/asm/tape390.h
new file mode 100644
index 00000000000..884fba48f1f
--- /dev/null
+++ b/arch/s390/include/asm/tape390.h
@@ -0,0 +1,103 @@
1/*************************************************************************
2 *
3 * tape390.h
4 * enables user programs to display messages and control encryption
5 * on s390 tape devices
6 *
7 * Copyright IBM Corp. 2001,2006
8 * Author(s): Michael Holzheu <holzheu@de.ibm.com>
9 *
10 *************************************************************************/
11
12#ifndef _TAPE390_H
13#define _TAPE390_H
14
15#define TAPE390_DISPLAY _IOW('d', 1, struct display_struct)
16
17/*
18 * The TAPE390_DISPLAY ioctl calls the Load Display command
19 * which transfers 17 bytes of data from the channel to the subsystem:
20 * - 1 format control byte, and
21 * - two 8-byte messages
22 *
23 * Format control byte:
24 * 0-2: New Message Overlay
25 * 3: Alternate Messages
26 * 4: Blink Message
27 * 5: Display Low/High Message
28 * 6: Reserved
29 * 7: Automatic Load Request
30 *
31 */
32
33typedef struct display_struct {
34 char cntrl;
35 char message1[8];
36 char message2[8];
37} display_struct;
38
39/*
40 * Tape encryption support
41 */
42
43struct tape390_crypt_info {
44 char capability;
45 char status;
46 char medium_status;
47} __attribute__ ((packed));
48
49
50/* Macros for "capable" field */
51#define TAPE390_CRYPT_SUPPORTED_MASK 0x01
52#define TAPE390_CRYPT_SUPPORTED(x) \
53 ((x.capability & TAPE390_CRYPT_SUPPORTED_MASK))
54
55/* Macros for "status" field */
56#define TAPE390_CRYPT_ON_MASK 0x01
57#define TAPE390_CRYPT_ON(x) (((x.status) & TAPE390_CRYPT_ON_MASK))
58
59/* Macros for "medium status" field */
60#define TAPE390_MEDIUM_LOADED_MASK 0x01
61#define TAPE390_MEDIUM_ENCRYPTED_MASK 0x02
62#define TAPE390_MEDIUM_ENCRYPTED(x) \
63 (((x.medium_status) & TAPE390_MEDIUM_ENCRYPTED_MASK))
64#define TAPE390_MEDIUM_LOADED(x) \
65 (((x.medium_status) & TAPE390_MEDIUM_LOADED_MASK))
66
67/*
68 * The TAPE390_CRYPT_SET ioctl is used to switch on/off encryption.
69 * The "encryption_capable" and "tape_status" fields are ignored for this ioctl!
70 */
71#define TAPE390_CRYPT_SET _IOW('d', 2, struct tape390_crypt_info)
72
73/*
74 * The TAPE390_CRYPT_QUERY ioctl is used to query the encryption state.
75 */
76#define TAPE390_CRYPT_QUERY _IOR('d', 3, struct tape390_crypt_info)
77
78/* Values for "kekl1/2_type" and "kekl1/2_type_on_tape" fields */
79#define TAPE390_KEKL_TYPE_NONE 0
80#define TAPE390_KEKL_TYPE_LABEL 1
81#define TAPE390_KEKL_TYPE_HASH 2
82
83struct tape390_kekl {
84 unsigned char type;
85 unsigned char type_on_tape;
86 char label[65];
87} __attribute__ ((packed));
88
89struct tape390_kekl_pair {
90 struct tape390_kekl kekl[2];
91} __attribute__ ((packed));
92
93/*
94 * The TAPE390_KEKL_SET ioctl is used to set Key Encrypting Key labels.
95 */
96#define TAPE390_KEKL_SET _IOW('d', 4, struct tape390_kekl_pair)
97
98/*
99 * The TAPE390_KEKL_QUERY ioctl is used to query Key Encrypting Key labels.
100 */
101#define TAPE390_KEKL_QUERY _IOR('d', 5, struct tape390_kekl_pair)
102
103#endif
diff --git a/arch/s390/include/asm/termbits.h b/arch/s390/include/asm/termbits.h
new file mode 100644
index 00000000000..71bf6ac6a2b
--- /dev/null
+++ b/arch/s390/include/asm/termbits.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_S390_TERMBITS_H
2#define _ASM_S390_TERMBITS_H
3
4#include <asm-generic/termbits.h>
5
6#endif
diff --git a/arch/s390/include/asm/timer.h b/arch/s390/include/asm/timer.h
new file mode 100644
index 00000000000..814243cafdf
--- /dev/null
+++ b/arch/s390/include/asm/timer.h
@@ -0,0 +1,55 @@
1/*
2 * include/asm-s390/timer.h
3 *
4 * (C) Copyright IBM Corp. 2003,2006
5 * Virtual CPU timer
6 *
7 * Author: Jan Glauber (jang@de.ibm.com)
8 */
9
10#ifndef _ASM_S390_TIMER_H
11#define _ASM_S390_TIMER_H
12
13#ifdef __KERNEL__
14
15#include <linux/timer.h>
16
17#define VTIMER_MAX_SLICE (0x7ffffffffffff000LL)
18
19struct vtimer_list {
20 struct list_head entry;
21
22 int cpu;
23 __u64 expires;
24 __u64 interval;
25
26 void (*function)(unsigned long);
27 unsigned long data;
28};
29
30/* the vtimer value will wrap after ca. 71 years */
31struct vtimer_queue {
32 struct list_head list;
33 spinlock_t lock;
34 __u64 timer; /* last programmed timer */
35 __u64 elapsed; /* elapsed time of timer expire values */
36 __u64 idle; /* temp var for idle */
37 int do_spt; /* =1: reprogram cpu timer in idle */
38};
39
40extern void init_virt_timer(struct vtimer_list *timer);
41extern void add_virt_timer(void *new);
42extern void add_virt_timer_periodic(void *new);
43extern int mod_virt_timer(struct vtimer_list *timer, __u64 expires);
44extern int mod_virt_timer_periodic(struct vtimer_list *timer, __u64 expires);
45extern int del_virt_timer(struct vtimer_list *timer);
46
47extern void init_cpu_vtimer(void);
48extern void vtime_init(void);
49
50extern void vtime_stop_cpu(void);
51extern void vtime_start_leave(void);
52
53#endif /* __KERNEL__ */
54
55#endif /* _ASM_S390_TIMER_H */
diff --git a/arch/s390/include/asm/ucontext.h b/arch/s390/include/asm/ucontext.h
new file mode 100644
index 00000000000..cfb874e66c9
--- /dev/null
+++ b/arch/s390/include/asm/ucontext.h
@@ -0,0 +1,35 @@
1/*
2 * include/asm-s390/ucontext.h
3 *
4 * S390 version
5 *
6 * Derived from "include/asm-i386/ucontext.h"
7 */
8
9#ifndef _ASM_S390_UCONTEXT_H
10#define _ASM_S390_UCONTEXT_H
11
12#define UC_EXTENDED 0x00000001
13
14#ifndef __s390x__
15
16struct ucontext_extended {
17 unsigned long uc_flags;
18 struct ucontext *uc_link;
19 stack_t uc_stack;
20 _sigregs uc_mcontext;
21 unsigned long uc_sigmask[2];
22 unsigned long uc_gprs_high[16];
23};
24
25#endif
26
27struct ucontext {
28 unsigned long uc_flags;
29 struct ucontext *uc_link;
30 stack_t uc_stack;
31 _sigregs uc_mcontext;
32 sigset_t uc_sigmask; /* mask last for extensibility */
33};
34
35#endif /* !_ASM_S390_UCONTEXT_H */
diff --git a/arch/s390/include/asm/vtoc.h b/arch/s390/include/asm/vtoc.h
new file mode 100644
index 00000000000..8406a2b3157
--- /dev/null
+++ b/arch/s390/include/asm/vtoc.h
@@ -0,0 +1,215 @@
1/*
2 * include/asm-s390/vtoc.h
3 *
4 * This file contains volume label definitions for DASD devices.
5 *
6 * (C) Copyright IBM Corp. 2005
7 *
8 * Author(s): Volker Sameske <sameske@de.ibm.com>
9 *
10 */
11
12#ifndef _ASM_S390_VTOC_H
13#define _ASM_S390_VTOC_H
14
15#include <linux/types.h>
16
17struct vtoc_ttr
18{
19 __u16 tt;
20 __u8 r;
21} __attribute__ ((packed));
22
23struct vtoc_cchhb
24{
25 __u16 cc;
26 __u16 hh;
27 __u8 b;
28} __attribute__ ((packed));
29
30struct vtoc_cchh
31{
32 __u16 cc;
33 __u16 hh;
34} __attribute__ ((packed));
35
36struct vtoc_labeldate
37{
38 __u8 year;
39 __u16 day;
40} __attribute__ ((packed));
41
42struct vtoc_volume_label_cdl
43{
44 char volkey[4]; /* volume key = volume label */
45 char vollbl[4]; /* volume label */
46 char volid[6]; /* volume identifier */
47 __u8 security; /* security byte */
48 struct vtoc_cchhb vtoc; /* VTOC address */
49 char res1[5]; /* reserved */
50 char cisize[4]; /* CI-size for FBA,... */
51 /* ...blanks for CKD */
52 char blkperci[4]; /* no of blocks per CI (FBA), blanks for CKD */
53 char labperci[4]; /* no of labels per CI (FBA), blanks for CKD */
54 char res2[4]; /* reserved */
55 char lvtoc[14]; /* owner code for LVTOC */
56 char res3[29]; /* reserved */
57} __attribute__ ((packed));
58
59struct vtoc_volume_label_ldl {
60 char vollbl[4]; /* volume label */
61 char volid[6]; /* volume identifier */
62 char res3[69]; /* reserved */
63 char ldl_version; /* version number, valid for ldl format */
64 __u64 formatted_blocks; /* valid when ldl_version >= f2 */
65} __attribute__ ((packed));
66
67struct vtoc_extent
68{
69 __u8 typeind; /* extent type indicator */
70 __u8 seqno; /* extent sequence number */
71 struct vtoc_cchh llimit; /* starting point of this extent */
72 struct vtoc_cchh ulimit; /* ending point of this extent */
73} __attribute__ ((packed));
74
75struct vtoc_dev_const
76{
77 __u16 DS4DSCYL; /* number of logical cyls */
78 __u16 DS4DSTRK; /* number of tracks in a logical cylinder */
79 __u16 DS4DEVTK; /* device track length */
80 __u8 DS4DEVI; /* non-last keyed record overhead */
81 __u8 DS4DEVL; /* last keyed record overhead */
82 __u8 DS4DEVK; /* non-keyed record overhead differential */
83 __u8 DS4DEVFG; /* flag byte */
84 __u16 DS4DEVTL; /* device tolerance */
85 __u8 DS4DEVDT; /* number of DSCB's per track */
86 __u8 DS4DEVDB; /* number of directory blocks per track */
87} __attribute__ ((packed));
88
89struct vtoc_format1_label
90{
91 char DS1DSNAM[44]; /* data set name */
92 __u8 DS1FMTID; /* format identifier */
93 char DS1DSSN[6]; /* data set serial number */
94 __u16 DS1VOLSQ; /* volume sequence number */
95 struct vtoc_labeldate DS1CREDT; /* creation date: ydd */
96 struct vtoc_labeldate DS1EXPDT; /* expiration date */
97 __u8 DS1NOEPV; /* number of extents on volume */
98 __u8 DS1NOBDB; /* no. of bytes used in last direction blk */
99 __u8 DS1FLAG1; /* flag 1 */
100 char DS1SYSCD[13]; /* system code */
101 struct vtoc_labeldate DS1REFD; /* date last referenced */
102 __u8 DS1SMSFG; /* system managed storage indicators */
103 __u8 DS1SCXTF; /* sec. space extension flag byte */
104 __u16 DS1SCXTV; /* secondary space extension value */
105 __u8 DS1DSRG1; /* data set organisation byte 1 */
106 __u8 DS1DSRG2; /* data set organisation byte 2 */
107 __u8 DS1RECFM; /* record format */
108 __u8 DS1OPTCD; /* option code */
109 __u16 DS1BLKL; /* block length */
110 __u16 DS1LRECL; /* record length */
111 __u8 DS1KEYL; /* key length */
112 __u16 DS1RKP; /* relative key position */
113 __u8 DS1DSIND; /* data set indicators */
114 __u8 DS1SCAL1; /* secondary allocation flag byte */
115 char DS1SCAL3[3]; /* secondary allocation quantity */
116 struct vtoc_ttr DS1LSTAR; /* last used track and block on track */
117 __u16 DS1TRBAL; /* space remaining on last used track */
118 __u16 res1; /* reserved */
119 struct vtoc_extent DS1EXT1; /* first extent description */
120 struct vtoc_extent DS1EXT2; /* second extent description */
121 struct vtoc_extent DS1EXT3; /* third extent description */
122 struct vtoc_cchhb DS1PTRDS; /* possible pointer to f2 or f3 DSCB */
123} __attribute__ ((packed));
124
125struct vtoc_format4_label
126{
127 char DS4KEYCD[44]; /* key code for VTOC labels: 44 times 0x04 */
128 __u8 DS4IDFMT; /* format identifier */
129 struct vtoc_cchhb DS4HPCHR; /* highest address of a format 1 DSCB */
130 __u16 DS4DSREC; /* number of available DSCB's */
131 struct vtoc_cchh DS4HCCHH; /* CCHH of next available alternate track */
132 __u16 DS4NOATK; /* number of remaining alternate tracks */
133 __u8 DS4VTOCI; /* VTOC indicators */
134 __u8 DS4NOEXT; /* number of extents in VTOC */
135 __u8 DS4SMSFG; /* system managed storage indicators */
136 __u8 DS4DEVAC; /* number of alternate cylinders.
137 * Subtract from first two bytes of
138 * DS4DEVSZ to get number of usable
139 * cylinders. can be zero. valid
140 * only if DS4DEVAV on. */
141 struct vtoc_dev_const DS4DEVCT; /* device constants */
142 char DS4AMTIM[8]; /* VSAM time stamp */
143 char DS4AMCAT[3]; /* VSAM catalog indicator */
144 char DS4R2TIM[8]; /* VSAM volume/catalog match time stamp */
145 char res1[5]; /* reserved */
146 char DS4F6PTR[5]; /* pointer to first format 6 DSCB */
147 struct vtoc_extent DS4VTOCE; /* VTOC extent description */
148 char res2[10]; /* reserved */
149 __u8 DS4EFLVL; /* extended free-space management level */
150 struct vtoc_cchhb DS4EFPTR; /* pointer to extended free-space info */
151 char res3; /* reserved */
152 __u32 DS4DCYL; /* number of logical cyls */
153 char res4[2]; /* reserved */
154 __u8 DS4DEVF2; /* device flags */
155 char res5; /* reserved */
156} __attribute__ ((packed));
157
158struct vtoc_ds5ext
159{
160 __u16 t; /* RTA of the first track of free extent */
161 __u16 fc; /* number of whole cylinders in free ext. */
162 __u8 ft; /* number of remaining free tracks */
163} __attribute__ ((packed));
164
165struct vtoc_format5_label
166{
167 char DS5KEYID[4]; /* key identifier */
168 struct vtoc_ds5ext DS5AVEXT; /* first available (free-space) extent. */
169 struct vtoc_ds5ext DS5EXTAV[7]; /* seven available extents */
170 __u8 DS5FMTID; /* format identifier */
171 struct vtoc_ds5ext DS5MAVET[18]; /* eighteen available extents */
172 struct vtoc_cchhb DS5PTRDS; /* pointer to next format5 DSCB */
173} __attribute__ ((packed));
174
175struct vtoc_ds7ext
176{
177 __u32 a; /* starting RTA value */
178 __u32 b; /* ending RTA value + 1 */
179} __attribute__ ((packed));
180
181struct vtoc_format7_label
182{
183 char DS7KEYID[4]; /* key identifier */
184 struct vtoc_ds7ext DS7EXTNT[5]; /* space for 5 extent descriptions */
185 __u8 DS7FMTID; /* format identifier */
186 struct vtoc_ds7ext DS7ADEXT[11]; /* space for 11 extent descriptions */
187 char res1[2]; /* reserved */
188 struct vtoc_cchhb DS7PTRDS; /* pointer to next FMT7 DSCB */
189} __attribute__ ((packed));
190
191struct vtoc_cms_label {
192 __u8 label_id[4]; /* Label identifier */
193 __u8 vol_id[6]; /* Volid */
194 __u16 version_id; /* Version identifier */
195 __u32 block_size; /* Disk block size */
196 __u32 origin_ptr; /* Disk origin pointer */
197 __u32 usable_count; /* Number of usable cylinders/blocks */
198 __u32 formatted_count; /* Maximum number of formatted cylinders/
199 * blocks */
200 __u32 block_count; /* Disk size in CMS blocks */
201 __u32 used_count; /* Number of CMS blocks in use */
202 __u32 fst_size; /* File Status Table (FST) size */
203 __u32 fst_count; /* Number of FSTs per CMS block */
204 __u8 format_date[6]; /* Disk FORMAT date */
205 __u8 reserved1[2];
206 __u32 disk_offset; /* Disk offset when reserved*/
207 __u32 map_block; /* Allocation Map Block with next hole */
208 __u32 hblk_disp; /* Displacement into HBLK data of next hole */
209 __u32 user_disp; /* Displacement into user part of Allocation
210 * map */
211 __u8 reserved2[4];
212 __u8 segment_name[8]; /* Name of shared segment */
213} __attribute__ ((packed));
214
215#endif /* _ASM_S390_VTOC_H */
diff --git a/arch/s390/include/asm/zcrypt.h b/arch/s390/include/asm/zcrypt.h
new file mode 100644
index 00000000000..00d3bbd4411
--- /dev/null
+++ b/arch/s390/include/asm/zcrypt.h
@@ -0,0 +1,276 @@
1/*
2 * include/asm-s390/zcrypt.h
3 *
4 * zcrypt 2.1.0 (user-visible header)
5 *
6 * Copyright (C) 2001, 2006 IBM Corporation
7 * Author(s): Robert Burroughs
8 * Eric Rossman (edrossma@us.ibm.com)
9 *
10 * Hotplug & misc device support: Jochen Roehrig (roehrig@de.ibm.com)
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2, or (at your option)
15 * any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 */
26
27#ifndef __ASM_S390_ZCRYPT_H
28#define __ASM_S390_ZCRYPT_H
29
30#define ZCRYPT_VERSION 2
31#define ZCRYPT_RELEASE 1
32#define ZCRYPT_VARIANT 1
33
34#include <linux/ioctl.h>
35#include <linux/compiler.h>
36
37/**
38 * struct ica_rsa_modexpo
39 *
40 * Requirements:
41 * - outputdatalength is at least as large as inputdatalength.
42 * - All key parts are right justified in their fields, padded on
43 * the left with zeroes.
44 * - length(b_key) = inputdatalength
45 * - length(n_modulus) = inputdatalength
46 */
47struct ica_rsa_modexpo {
48 char __user * inputdata;
49 unsigned int inputdatalength;
50 char __user * outputdata;
51 unsigned int outputdatalength;
52 char __user * b_key;
53 char __user * n_modulus;
54};
55
56/**
57 * struct ica_rsa_modexpo_crt
58 *
59 * Requirements:
60 * - inputdatalength is even.
61 * - outputdatalength is at least as large as inputdatalength.
62 * - All key parts are right justified in their fields, padded on
63 * the left with zeroes.
64 * - length(bp_key) = inputdatalength/2 + 8
65 * - length(bq_key) = inputdatalength/2
66 * - length(np_key) = inputdatalength/2 + 8
67 * - length(nq_key) = inputdatalength/2
68 * - length(u_mult_inv) = inputdatalength/2 + 8
69 */
70struct ica_rsa_modexpo_crt {
71 char __user * inputdata;
72 unsigned int inputdatalength;
73 char __user * outputdata;
74 unsigned int outputdatalength;
75 char __user * bp_key;
76 char __user * bq_key;
77 char __user * np_prime;
78 char __user * nq_prime;
79 char __user * u_mult_inv;
80};
81
82/**
83 * CPRBX
84 * Note that all shorts and ints are big-endian.
85 * All pointer fields are 16 bytes long, and mean nothing.
86 *
87 * A request CPRB is followed by a request_parameter_block.
88 *
89 * The request (or reply) parameter block is organized thus:
90 * function code
91 * VUD block
92 * key block
93 */
94struct CPRBX {
95 unsigned short cprb_len; /* CPRB length 220 */
96 unsigned char cprb_ver_id; /* CPRB version id. 0x02 */
97 unsigned char pad_000[3]; /* Alignment pad bytes */
98 unsigned char func_id[2]; /* function id 0x5432 */
99 unsigned char cprb_flags[4]; /* Flags */
100 unsigned int req_parml; /* request parameter buffer len */
101 unsigned int req_datal; /* request data buffer */
102 unsigned int rpl_msgbl; /* reply message block length */
103 unsigned int rpld_parml; /* replied parameter block len */
104 unsigned int rpl_datal; /* reply data block len */
105 unsigned int rpld_datal; /* replied data block len */
106 unsigned int req_extbl; /* request extension block len */
107 unsigned char pad_001[4]; /* reserved */
108 unsigned int rpld_extbl; /* replied extension block len */
109 unsigned char padx000[16 - sizeof (char *)];
110 unsigned char * req_parmb; /* request parm block 'address' */
111 unsigned char padx001[16 - sizeof (char *)];
112 unsigned char * req_datab; /* request data block 'address' */
113 unsigned char padx002[16 - sizeof (char *)];
114 unsigned char * rpl_parmb; /* reply parm block 'address' */
115 unsigned char padx003[16 - sizeof (char *)];
116 unsigned char * rpl_datab; /* reply data block 'address' */
117 unsigned char padx004[16 - sizeof (char *)];
118 unsigned char * req_extb; /* request extension block 'addr'*/
119 unsigned char padx005[16 - sizeof (char *)];
120 unsigned char * rpl_extb; /* reply extension block 'address'*/
121 unsigned short ccp_rtcode; /* server return code */
122 unsigned short ccp_rscode; /* server reason code */
123 unsigned int mac_data_len; /* Mac Data Length */
124 unsigned char logon_id[8]; /* Logon Identifier */
125 unsigned char mac_value[8]; /* Mac Value */
126 unsigned char mac_content_flgs;/* Mac content flag byte */
127 unsigned char pad_002; /* Alignment */
128 unsigned short domain; /* Domain */
129 unsigned char usage_domain[4];/* Usage domain */
130 unsigned char cntrl_domain[4];/* Control domain */
131 unsigned char S390enf_mask[4];/* S/390 enforcement mask */
132 unsigned char pad_004[36]; /* reserved */
133} __attribute__((packed));
134
135/**
136 * xcRB
137 */
138struct ica_xcRB {
139 unsigned short agent_ID;
140 unsigned int user_defined;
141 unsigned short request_ID;
142 unsigned int request_control_blk_length;
143 unsigned char padding1[16 - sizeof (char *)];
144 char __user * request_control_blk_addr;
145 unsigned int request_data_length;
146 char padding2[16 - sizeof (char *)];
147 char __user * request_data_address;
148 unsigned int reply_control_blk_length;
149 char padding3[16 - sizeof (char *)];
150 char __user * reply_control_blk_addr;
151 unsigned int reply_data_length;
152 char padding4[16 - sizeof (char *)];
153 char __user * reply_data_addr;
154 unsigned short priority_window;
155 unsigned int status;
156} __attribute__((packed));
157#define AUTOSELECT ((unsigned int)0xFFFFFFFF)
158
159#define ZCRYPT_IOCTL_MAGIC 'z'
160
161/**
162 * Interface notes:
163 *
164 * The ioctl()s which are implemented (along with relevant details)
165 * are:
166 *
167 * ICARSAMODEXPO
168 * Perform an RSA operation using a Modulus-Exponent pair
169 * This takes an ica_rsa_modexpo struct as its arg.
170 *
171 * NOTE: please refer to the comments preceding this structure
172 * for the implementation details for the contents of the
173 * block
174 *
175 * ICARSACRT
176 * Perform an RSA operation using a Chinese-Remainder Theorem key
177 * This takes an ica_rsa_modexpo_crt struct as its arg.
178 *
179 * NOTE: please refer to the comments preceding this structure
180 * for the implementation details for the contents of the
181 * block
182 *
183 * ZSECSENDCPRB
184 * Send an arbitrary CPRB to a crypto card.
185 *
186 * Z90STAT_STATUS_MASK
187 * Return an 64 element array of unsigned chars for the status of
188 * all devices.
189 * 0x01: PCICA
190 * 0x02: PCICC
191 * 0x03: PCIXCC_MCL2
192 * 0x04: PCIXCC_MCL3
193 * 0x05: CEX2C
194 * 0x06: CEX2A
195 * 0x0d: device is disabled via the proc filesystem
196 *
197 * Z90STAT_QDEPTH_MASK
198 * Return an 64 element array of unsigned chars for the queue
199 * depth of all devices.
200 *
201 * Z90STAT_PERDEV_REQCNT
202 * Return an 64 element array of unsigned integers for the number
203 * of successfully completed requests per device since the device
204 * was detected and made available.
205 *
206 * Z90STAT_REQUESTQ_COUNT
207 * Return an integer count of the number of entries waiting to be
208 * sent to a device.
209 *
210 * Z90STAT_PENDINGQ_COUNT
211 * Return an integer count of the number of entries sent to all
212 * devices awaiting the reply.
213 *
214 * Z90STAT_TOTALOPEN_COUNT
215 * Return an integer count of the number of open file handles.
216 *
217 * Z90STAT_DOMAIN_INDEX
218 * Return the integer value of the Cryptographic Domain.
219 *
220 * The following ioctls are deprecated and should be no longer used:
221 *
222 * Z90STAT_TOTALCOUNT
223 * Return an integer count of all device types together.
224 *
225 * Z90STAT_PCICACOUNT
226 * Return an integer count of all PCICAs.
227 *
228 * Z90STAT_PCICCCOUNT
229 * Return an integer count of all PCICCs.
230 *
231 * Z90STAT_PCIXCCMCL2COUNT
232 * Return an integer count of all MCL2 PCIXCCs.
233 *
234 * Z90STAT_PCIXCCMCL3COUNT
235 * Return an integer count of all MCL3 PCIXCCs.
236 *
237 * Z90STAT_CEX2CCOUNT
238 * Return an integer count of all CEX2Cs.
239 *
240 * Z90STAT_CEX2ACOUNT
241 * Return an integer count of all CEX2As.
242 *
243 * ICAZ90STATUS
244 * Return some device driver status in a ica_z90_status struct
245 * This takes an ica_z90_status struct as its arg.
246 *
247 * Z90STAT_PCIXCCCOUNT
248 * Return an integer count of all PCIXCCs (MCL2 + MCL3).
249 * This is DEPRECATED now that MCL3 PCIXCCs are treated differently from
250 * MCL2 PCIXCCs.
251 */
252
253/**
254 * Supported ioctl calls
255 */
256#define ICARSAMODEXPO _IOC(_IOC_READ|_IOC_WRITE, ZCRYPT_IOCTL_MAGIC, 0x05, 0)
257#define ICARSACRT _IOC(_IOC_READ|_IOC_WRITE, ZCRYPT_IOCTL_MAGIC, 0x06, 0)
258#define ZSECSENDCPRB _IOC(_IOC_READ|_IOC_WRITE, ZCRYPT_IOCTL_MAGIC, 0x81, 0)
259
260/* New status calls */
261#define Z90STAT_TOTALCOUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x40, int)
262#define Z90STAT_PCICACOUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x41, int)
263#define Z90STAT_PCICCCOUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x42, int)
264#define Z90STAT_PCIXCCMCL2COUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x4b, int)
265#define Z90STAT_PCIXCCMCL3COUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x4c, int)
266#define Z90STAT_CEX2CCOUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x4d, int)
267#define Z90STAT_CEX2ACOUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x4e, int)
268#define Z90STAT_REQUESTQ_COUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x44, int)
269#define Z90STAT_PENDINGQ_COUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x45, int)
270#define Z90STAT_TOTALOPEN_COUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x46, int)
271#define Z90STAT_DOMAIN_INDEX _IOR(ZCRYPT_IOCTL_MAGIC, 0x47, int)
272#define Z90STAT_STATUS_MASK _IOR(ZCRYPT_IOCTL_MAGIC, 0x48, char[64])
273#define Z90STAT_QDEPTH_MASK _IOR(ZCRYPT_IOCTL_MAGIC, 0x49, char[64])
274#define Z90STAT_PERDEV_REQCNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x4a, int[64])
275
276#endif /* __ASM_S390_ZCRYPT_H */