Merge tag 'v3.3.7' into 3.3/master
[zen-stable.git] / arch / s390 / include / asm / chsc.h
blob4943654ed7fd673c55ad324dacdbde891a6d45cc
1 /*
2 * ioctl interface for /dev/chsc
4 * Copyright 2008 IBM Corp.
5 * Author(s): Cornelia Huck <cornelia.huck@de.ibm.com>
6 */
8 #ifndef _ASM_CHSC_H
9 #define _ASM_CHSC_H
11 #include <linux/types.h>
12 #include <asm/chpid.h>
13 #include <asm/schid.h>
15 struct 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));
24 struct chsc_async_area {
25 struct chsc_async_header header;
26 __u8 data[PAGE_SIZE - 16 /* size of chsc_async_header */];
27 } __attribute__ ((packed));
30 struct chsc_response_struct {
31 __u16 length;
32 __u16 code;
33 __u32 parms;
34 __u8 data[PAGE_SIZE - 8];
35 } __attribute__ ((packed));
37 struct chsc_chp_cd {
38 struct chp_id chpid;
39 int m;
40 int fmt;
41 struct chsc_response_struct cpcb;
44 struct chsc_cu_cd {
45 __u16 cun;
46 __u8 cssid;
47 int m;
48 int fmt;
49 struct chsc_response_struct cucb;
52 struct chsc_sch_cud {
53 struct subchannel_id schid;
54 int fmt;
55 struct chsc_response_struct scub;
58 struct conf_id {
59 int m;
60 __u8 cssid;
61 __u8 ssid;
64 struct chsc_conf_info {
65 struct conf_id id;
66 int fmt;
67 struct chsc_response_struct scid;
70 struct ccl_parm_chpid {
71 int m;
72 struct chp_id chp;
75 struct ccl_parm_cssids {
76 __u8 f_cssid;
77 __u8 l_cssid;
80 struct 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;
96 struct 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;
107 struct 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;
116 #define CHSC_IOCTL_MAGIC 'c'
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)
128 #ifdef __KERNEL__
130 struct 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));
153 extern struct css_general_char css_general_characteristics;
155 #endif /* __KERNEL__ */
156 #endif