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)
28 register struct subchannel_id reg1 asm ("1") = schid;
35 : "=d" (ccode) : "d" (reg1), "a" (addr), "m" (*addr) : "cc");
39 static inline int stsch_err(struct subchannel_id schid,
40 volatile struct schib *addr)
42 register struct subchannel_id reg1 asm ("1") = schid;
51 : "+d" (ccode) : "d" (reg1), "a" (addr), "m" (*addr) : "cc");
55 static inline int msch(struct subchannel_id schid,
56 volatile struct schib *addr)
58 register struct subchannel_id reg1 asm ("1") = schid;
65 : "=d" (ccode) : "d" (reg1), "a" (addr), "m" (*addr) : "cc");
69 static inline int msch_err(struct subchannel_id schid,
70 volatile struct schib *addr)
72 register struct subchannel_id reg1 asm ("1") = schid;
81 : "+d" (ccode) : "d" (reg1), "a" (addr), "m" (*addr) : "cc");
85 static inline int tsch(struct subchannel_id schid,
86 volatile struct irb *addr)
88 register struct subchannel_id reg1 asm ("1") = schid;
95 : "=d" (ccode) : "d" (reg1), "a" (addr), "m" (*addr) : "cc");
99 static inline int tpi( volatile struct tpi_info *addr)
107 : "=d" (ccode) : "a" (addr), "m" (*addr) : "cc");
111 static inline int ssch(struct subchannel_id schid,
112 volatile struct orb *addr)
114 register struct subchannel_id reg1 asm ("1") = schid;
121 : "=d" (ccode) : "d" (reg1), "a" (addr), "m" (*addr) : "cc");
125 static inline int rsch(struct subchannel_id schid)
127 register struct subchannel_id reg1 asm ("1") = schid;
134 : "=d" (ccode) : "d" (reg1) : "cc");
138 static inline int csch(struct subchannel_id schid)
140 register struct subchannel_id reg1 asm ("1") = schid;
147 : "=d" (ccode) : "d" (reg1) : "cc");
151 static inline int hsch(struct subchannel_id schid)
153 register struct subchannel_id reg1 asm ("1") = schid;
160 : "=d" (ccode) : "d" (reg1) : "cc");
164 static inline int xsch(struct subchannel_id schid)
166 register struct subchannel_id reg1 asm ("1") = schid;
170 " .insn rre,0xb2760000,%1,0\n"
173 : "=d" (ccode) : "d" (reg1) : "cc");
177 static inline int chsc(void *chsc_area)
179 typedef struct { char _[4096]; } addr_type;
183 " .insn rre,0xb25f0000,%2,0\n"
186 : "=d" (cc), "=m" (*(addr_type *) chsc_area)
187 : "d" (chsc_area), "m" (*(addr_type *) chsc_area)
192 static inline int rchp(int chpid)
194 register unsigned int reg1 asm ("1") = chpid;
202 : "=d" (ccode) : "d" (reg1) : "cc");