diff options
Diffstat (limited to 'drivers/s390/cio/ioasm.h')
-rw-r--r-- | drivers/s390/cio/ioasm.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/s390/cio/ioasm.h b/drivers/s390/cio/ioasm.h index 66c882e52f32..62b0e2ad507f 100644 --- a/drivers/s390/cio/ioasm.h +++ b/drivers/s390/cio/ioasm.h | |||
@@ -38,6 +38,35 @@ static inline int stsch(struct subchannel_id schid, | |||
38 | return ccode; | 38 | return ccode; |
39 | } | 39 | } |
40 | 40 | ||
41 | static inline int stsch_err(struct subchannel_id schid, | ||
42 | volatile struct schib *addr) | ||
43 | { | ||
44 | int ccode; | ||
45 | |||
46 | __asm__ __volatile__( | ||
47 | " lhi %0,%3\n" | ||
48 | " lr 1,%1\n" | ||
49 | " stsch 0(%2)\n" | ||
50 | "0: ipm %0\n" | ||
51 | " srl %0,28\n" | ||
52 | "1:\n" | ||
53 | #ifdef CONFIG_ARCH_S390X | ||
54 | ".section __ex_table,\"a\"\n" | ||
55 | " .align 8\n" | ||
56 | " .quad 0b,1b\n" | ||
57 | ".previous" | ||
58 | #else | ||
59 | ".section __ex_table,\"a\"\n" | ||
60 | " .align 4\n" | ||
61 | " .long 0b,1b\n" | ||
62 | ".previous" | ||
63 | #endif | ||
64 | : "=&d" (ccode) | ||
65 | : "d" (schid), "a" (addr), "K" (-EIO), "m" (*addr) | ||
66 | : "cc", "1" ); | ||
67 | return ccode; | ||
68 | } | ||
69 | |||
41 | static inline int msch(struct subchannel_id schid, | 70 | static inline int msch(struct subchannel_id schid, |
42 | volatile struct schib *addr) | 71 | volatile struct schib *addr) |
43 | { | 72 | { |