1 #ifndef S390_CIO_IOASM_H
2 #define S390_CIO_IOASM_H
13 struct subchannel_id schid
;
14 __u32 intparm
; /* interruption parameter */
21 } __attribute__ ((packed
));
25 * Some S390 specific IO instructions as inline
28 static inline int stsch_err(struct subchannel_id schid
, struct schib
*addr
)
30 register struct subchannel_id reg1
asm ("1") = schid
;
39 : "+d" (ccode
), "=m" (*addr
)
40 : "d" (reg1
), "a" (addr
)
45 static inline int msch(struct subchannel_id schid
, struct schib
*addr
)
47 register struct subchannel_id reg1
asm ("1") = schid
;
55 : "d" (reg1
), "a" (addr
), "m" (*addr
)
60 static inline int msch_err(struct subchannel_id schid
, struct schib
*addr
)
62 register struct subchannel_id reg1
asm ("1") = schid
;
72 : "d" (reg1
), "a" (addr
), "m" (*addr
)
77 static inline int tsch(struct subchannel_id schid
, struct irb
*addr
)
79 register struct subchannel_id reg1
asm ("1") = schid
;
86 : "=d" (ccode
), "=m" (*addr
)
87 : "d" (reg1
), "a" (addr
)
92 static inline int ssch(struct subchannel_id schid
, union orb
*addr
)
94 register struct subchannel_id reg1
asm("1") = schid
;
104 : "d" (reg1
), "a" (addr
), "m" (*addr
)
109 static inline int csch(struct subchannel_id schid
)
111 register struct subchannel_id reg1
asm("1") = schid
;
124 static inline int tpi(struct tpi_info
*addr
)
132 : "=d" (ccode
), "=m" (*addr
)
138 static inline int chsc(void *chsc_area
)
140 typedef struct { char _
[4096]; } addr_type
;
144 " .insn rre,0xb25f0000,%2,0\n"
147 : "=d" (cc
), "=m" (*(addr_type
*) chsc_area
)
148 : "d" (chsc_area
), "m" (*(addr_type
*) chsc_area
)
153 static inline int rchp(struct chp_id chpid
)
155 register struct chp_id reg1
asm ("1") = chpid
;
163 : "=d" (ccode
) : "d" (reg1
) : "cc");