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"
174 : "=d" (cc
), "=m" (*(addr_type
*) chsc_area
)
175 : "d" (chsc_area
), "m" (*(addr_type
*) chsc_area
)
177 trace_s390_cio_chsc(chsc_area
, cc
);
183 static inline int __rchp(struct chp_id chpid
)
185 register struct chp_id reg1
asm ("1") = chpid
;
193 : "=d" (ccode
) : "d" (reg1
) : "cc");
197 int rchp(struct chp_id chpid
)
201 ccode
= __rchp(chpid
);
202 trace_s390_cio_rchp(chpid
, ccode
);
207 static inline int __rsch(struct subchannel_id schid
)
209 register struct subchannel_id reg1
asm("1") = schid
;
223 int rsch(struct subchannel_id schid
)
227 ccode
= __rsch(schid
);
228 trace_s390_cio_rsch(schid
, ccode
);
233 static inline int __hsch(struct subchannel_id schid
)
235 register struct subchannel_id reg1
asm("1") = schid
;
248 int hsch(struct subchannel_id schid
)
252 ccode
= __hsch(schid
);
253 trace_s390_cio_hsch(schid
, ccode
);
258 static inline int __xsch(struct subchannel_id schid
)
260 register struct subchannel_id reg1
asm("1") = schid
;
273 int xsch(struct subchannel_id schid
)
277 ccode
= __xsch(schid
);
278 trace_s390_cio_xsch(schid
, ccode
);
283 int stcrw(struct crw
*crw
)
291 : "=d" (ccode
), "=m" (*crw
)
294 trace_s390_cio_stcrw(crw
, ccode
);