1 #ifndef S390_CIO_IOASM_H
2 #define S390_CIO_IOASM_H
11 struct subchannel_id schid
;
12 __u32 intparm
; /* interruption parameter */
19 } __attribute__ ((packed
));
23 * Some S390 specific IO instructions as inline
26 static inline int stsch(struct subchannel_id schid
,
27 volatile struct schib
*addr
)
29 register struct subchannel_id reg1
asm ("1") = schid
;
36 : "=d" (ccode
) : "d" (reg1
), "a" (addr
), "m" (*addr
) : "cc");
40 static inline int stsch_err(struct subchannel_id schid
,
41 volatile struct schib
*addr
)
43 register struct subchannel_id reg1
asm ("1") = schid
;
52 : "+d" (ccode
) : "d" (reg1
), "a" (addr
), "m" (*addr
) : "cc");
56 static inline int msch(struct subchannel_id schid
,
57 volatile struct schib
*addr
)
59 register struct subchannel_id reg1
asm ("1") = schid
;
66 : "=d" (ccode
) : "d" (reg1
), "a" (addr
), "m" (*addr
) : "cc");
70 static inline int msch_err(struct subchannel_id schid
,
71 volatile struct schib
*addr
)
73 register struct subchannel_id reg1
asm ("1") = schid
;
82 : "+d" (ccode
) : "d" (reg1
), "a" (addr
), "m" (*addr
) : "cc");
86 static inline int tsch(struct subchannel_id schid
,
87 volatile struct irb
*addr
)
89 register struct subchannel_id reg1
asm ("1") = schid
;
96 : "=d" (ccode
) : "d" (reg1
), "a" (addr
), "m" (*addr
) : "cc");
100 static inline int tpi( volatile struct tpi_info
*addr
)
108 : "=d" (ccode
) : "a" (addr
), "m" (*addr
) : "cc");
112 static inline int ssch(struct subchannel_id schid
,
113 volatile struct orb
*addr
)
115 register struct subchannel_id reg1
asm ("1") = schid
;
122 : "=d" (ccode
) : "d" (reg1
), "a" (addr
), "m" (*addr
) : "cc");
126 static inline int rsch(struct subchannel_id schid
)
128 register struct subchannel_id reg1
asm ("1") = schid
;
135 : "=d" (ccode
) : "d" (reg1
) : "cc");
139 static inline int csch(struct subchannel_id schid
)
141 register struct subchannel_id reg1
asm ("1") = schid
;
148 : "=d" (ccode
) : "d" (reg1
) : "cc");
152 static inline int hsch(struct subchannel_id schid
)
154 register struct subchannel_id reg1
asm ("1") = schid
;
161 : "=d" (ccode
) : "d" (reg1
) : "cc");
165 static inline int xsch(struct subchannel_id schid
)
167 register struct subchannel_id reg1
asm ("1") = schid
;
171 " .insn rre,0xb2760000,%1,0\n"
174 : "=d" (ccode
) : "d" (reg1
) : "cc");
178 static inline int chsc(void *chsc_area
)
180 typedef struct { char _
[4096]; } addr_type
;
184 " .insn rre,0xb25f0000,%2,0\n"
187 : "=d" (cc
), "=m" (*(addr_type
*) chsc_area
)
188 : "d" (chsc_area
), "m" (*(addr_type
*) chsc_area
)
193 static inline int rchp(struct chp_id chpid
)
195 register struct chp_id reg1
asm ("1") = chpid
;
203 : "=d" (ccode
) : "d" (reg1
) : "cc");