1 #ifndef S390_CIO_IOASM_H
2 #define S390_CIO_IOASM_H
10 struct subchannel_id schid
;
11 __u32 intparm
; /* interruption parameter */
18 } __attribute__ ((packed
));
22 * Some S390 specific IO instructions as inline
25 static inline int stsch(struct subchannel_id schid
,
26 volatile struct schib
*addr
)
36 : "d" (schid
), "a" (addr
), "m" (*addr
)
41 static inline int stsch_err(struct subchannel_id schid
,
42 volatile struct schib
*addr
)
54 ".section __ex_table,\"a\"\n"
59 ".section __ex_table,\"a\"\n"
65 : "d" (schid
), "a" (addr
), "K" (-EIO
), "m" (*addr
)
70 static inline int msch(struct subchannel_id schid
,
71 volatile struct schib
*addr
)
81 : "d" (schid
), "a" (addr
), "m" (*addr
)
86 static inline int msch_err(struct subchannel_id schid
,
87 volatile struct schib
*addr
)
99 ".section __ex_table,\"a\"\n"
104 ".section __ex_table,\"a\"\n"
110 : "d" (schid
), "a" (addr
), "K" (-EIO
), "m" (*addr
)
115 static inline int tsch(struct subchannel_id schid
,
116 volatile struct irb
*addr
)
120 __asm__
__volatile__(
126 : "d" (schid
), "a" (addr
), "m" (*addr
)
131 static inline int tpi( volatile struct tpi_info
*addr
)
135 __asm__
__volatile__(
140 : "a" (addr
), "m" (*addr
)
145 static inline int ssch(struct subchannel_id schid
,
146 volatile struct orb
*addr
)
150 __asm__
__volatile__(
156 : "d" (schid
), "a" (addr
), "m" (*addr
)
161 static inline int rsch(struct subchannel_id schid
)
165 __asm__
__volatile__(
176 static inline int csch(struct subchannel_id schid
)
180 __asm__
__volatile__(
191 static inline int hsch(struct subchannel_id schid
)
195 __asm__
__volatile__(
206 static inline int xsch(struct subchannel_id schid
)
210 __asm__
__volatile__(
212 " .insn rre,0xb2760000,%1,0\n"
221 static inline int chsc(void *chsc_area
)
223 typedef struct { char _
[4096]; } addr_type
;
226 __asm__
__volatile__ (
227 ".insn rre,0xb25f0000,%2,0 \n\t"
230 : "=d" (cc
), "=m" (*(addr_type
*) chsc_area
)
231 : "d" (chsc_area
), "m" (*(addr_type
*) chsc_area
)
237 static inline int iac( void)
241 __asm__
__volatile__(
245 : "=d" (ccode
) : : "cc", "1" );
249 static inline int rchp(int chpid
)
253 __asm__
__volatile__(