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 msch(struct subchannel_id schid,
42 volatile struct schib *addr)
52 : "d" (schid), "a" (addr), "m" (*addr)
57 static inline int msch_err(struct subchannel_id schid,
58 volatile struct schib *addr)
69 #ifdef CONFIG_ARCH_S390X
70 ".section __ex_table,\"a\"\n"
75 ".section __ex_table,\"a\"\n"
81 : "d" (schid), "a" (addr), "K" (-EIO), "m" (*addr)
86 static inline int tsch(struct subchannel_id schid,
87 volatile struct irb *addr)
97 : "d" (schid), "a" (addr), "m" (*addr)
102 static inline int tpi( volatile struct tpi_info *addr)
106 __asm__ __volatile__(
111 : "a" (addr), "m" (*addr)
116 static inline int ssch(struct subchannel_id schid,
117 volatile struct orb *addr)
121 __asm__ __volatile__(
127 : "d" (schid), "a" (addr), "m" (*addr)
132 static inline int rsch(struct subchannel_id schid)
136 __asm__ __volatile__(
147 static inline int csch(struct subchannel_id schid)
151 __asm__ __volatile__(
162 static inline int hsch(struct subchannel_id schid)
166 __asm__ __volatile__(
177 static inline int xsch(struct subchannel_id schid)
181 __asm__ __volatile__(
183 " .insn rre,0xb2760000,%1,0\n"
192 static inline int chsc(void *chsc_area)
194 typedef struct { char _[4096]; } addr_type;
197 __asm__ __volatile__ (
198 ".insn rre,0xb25f0000,%2,0 \n\t"
201 : "=d" (cc), "=m" (*(addr_type *) chsc_area)
202 : "d" (chsc_area), "m" (*(addr_type *) chsc_area)
208 static inline int iac( void)
212 __asm__ __volatile__(
216 : "=d" (ccode) : : "cc", "1" );
220 static inline int rchp(int chpid)
224 __asm__ __volatile__(