2 * Channel subsystem I/O instructions.
5 #include <linux/export.h>
15 static inline int __stsch(struct subchannel_id schid, struct schib *addr)
17 register struct subchannel_id reg1 asm ("1") = schid;
26 : "+d" (ccode), "=m" (*addr)
27 : "d" (reg1), "a" (addr)
32 int stsch(struct subchannel_id schid, struct schib *addr)
36 ccode = __stsch(schid, addr);
37 trace_s390_cio_stsch(schid, addr, ccode);
43 static inline int __msch(struct subchannel_id schid, struct schib *addr)
45 register struct subchannel_id reg1 asm ("1") = schid;
55 : "d" (reg1), "a" (addr), "m" (*addr)
60 int msch(struct subchannel_id schid, struct schib *addr)
64 ccode = __msch(schid, addr);
65 trace_s390_cio_msch(schid, addr, ccode);
70 static inline int __tsch(struct subchannel_id schid, struct irb *addr)
72 register struct subchannel_id reg1 asm ("1") = schid;
79 : "=d" (ccode), "=m" (*addr)
80 : "d" (reg1), "a" (addr)
85 int tsch(struct subchannel_id schid, struct irb *addr)
89 ccode = __tsch(schid, addr);
90 trace_s390_cio_tsch(schid, addr, ccode);
95 static inline int __ssch(struct subchannel_id schid, union orb *addr)
97 register struct subchannel_id reg1 asm("1") = schid;
107 : "d" (reg1), "a" (addr), "m" (*addr)
112 int ssch(struct subchannel_id schid, union orb *addr)
116 ccode = __ssch(schid, addr);
117 trace_s390_cio_ssch(schid, addr, ccode);
123 static inline int __csch(struct subchannel_id schid)
125 register struct subchannel_id reg1 asm("1") = schid;
138 int csch(struct subchannel_id schid)
142 ccode = __csch(schid);
143 trace_s390_cio_csch(schid, ccode);
149 int tpi(struct tpi_info *addr)
157 : "=d" (ccode), "=m" (*addr)
160 trace_s390_cio_tpi(addr, ccode);
165 int chsc(void *chsc_area)
167 typedef struct { char _[4096]; } addr_type;
171 " .insn rre,0xb25f0000,%2,0\n"
176 : "+d" (cc), "=m" (*(addr_type *) chsc_area)
177 : "d" (chsc_area), "m" (*(addr_type *) chsc_area)
179 trace_s390_cio_chsc(chsc_area, cc);
185 static inline int __rchp(struct chp_id chpid)
187 register struct chp_id reg1 asm ("1") = chpid;
195 : "=d" (ccode) : "d" (reg1) : "cc");
199 int rchp(struct chp_id chpid)
203 ccode = __rchp(chpid);
204 trace_s390_cio_rchp(chpid, ccode);
209 static inline int __rsch(struct subchannel_id schid)
211 register struct subchannel_id reg1 asm("1") = schid;
225 int rsch(struct subchannel_id schid)
229 ccode = __rsch(schid);
230 trace_s390_cio_rsch(schid, ccode);
235 static inline int __hsch(struct subchannel_id schid)
237 register struct subchannel_id reg1 asm("1") = schid;
250 int hsch(struct subchannel_id schid)
254 ccode = __hsch(schid);
255 trace_s390_cio_hsch(schid, ccode);
260 static inline int __xsch(struct subchannel_id schid)
262 register struct subchannel_id reg1 asm("1") = schid;
275 int xsch(struct subchannel_id schid)
279 ccode = __xsch(schid);
280 trace_s390_cio_xsch(schid, ccode);
285 int stcrw(struct crw *crw)
293 : "=d" (ccode), "=m" (*crw)
296 trace_s390_cio_stcrw(crw, ccode);