aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2011-03-15 12:08:24 -0400
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2011-03-15 12:08:23 -0400
commitdbda8ce5407c731a0108a35db3e058d5d350dd80 (patch)
tree3bcf6fbb2d8e0e501c73fe718b6c23ee20b0a06b /drivers/s390/cio
parent9e6f9f851cfa41f42f8985e0b82a54b1b28d3465 (diff)
[S390] cio: move asms to generic header
The ssch and csch functions are not I/O subchannel specific, thus move them from io_sch.h to ioasm.h Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r--drivers/s390/cio/io_sch.h32
-rw-r--r--drivers/s390/cio/ioasm.h34
2 files changed, 34 insertions, 32 deletions
diff --git a/drivers/s390/cio/io_sch.h b/drivers/s390/cio/io_sch.h
index 20e7a1b127ce..36870d9f108a 100644
--- a/drivers/s390/cio/io_sch.h
+++ b/drivers/s390/cio/io_sch.h
@@ -139,23 +139,6 @@ struct ccw_device_private {
139 void *cmb_wait; /* deferred cmb enable/disable */ 139 void *cmb_wait; /* deferred cmb enable/disable */
140}; 140};
141 141
142static inline int ssch(struct subchannel_id schid, union orb *addr)
143{
144 register struct subchannel_id reg1 asm("1") = schid;
145 int ccode = -EIO;
146
147 asm volatile(
148 " ssch 0(%2)\n"
149 "0: ipm %0\n"
150 " srl %0,28\n"
151 "1:\n"
152 EX_TABLE(0b, 1b)
153 : "+d" (ccode)
154 : "d" (reg1), "a" (addr), "m" (*addr)
155 : "cc", "memory");
156 return ccode;
157}
158
159static inline int rsch(struct subchannel_id schid) 142static inline int rsch(struct subchannel_id schid)
160{ 143{
161 register struct subchannel_id reg1 asm("1") = schid; 144 register struct subchannel_id reg1 asm("1") = schid;
@@ -171,21 +154,6 @@ static inline int rsch(struct subchannel_id schid)
171 return ccode; 154 return ccode;
172} 155}
173 156
174static inline int csch(struct subchannel_id schid)
175{
176 register struct subchannel_id reg1 asm("1") = schid;
177 int ccode;
178
179 asm volatile(
180 " csch\n"
181 " ipm %0\n"
182 " srl %0,28"
183 : "=d" (ccode)
184 : "d" (reg1)
185 : "cc");
186 return ccode;
187}
188
189static inline int hsch(struct subchannel_id schid) 157static inline int hsch(struct subchannel_id schid)
190{ 158{
191 register struct subchannel_id reg1 asm("1") = schid; 159 register struct subchannel_id reg1 asm("1") = schid;
diff --git a/drivers/s390/cio/ioasm.h b/drivers/s390/cio/ioasm.h
index fac06155773f..4d80fc67a06b 100644
--- a/drivers/s390/cio/ioasm.h
+++ b/drivers/s390/cio/ioasm.h
@@ -3,6 +3,8 @@
3 3
4#include <asm/chpid.h> 4#include <asm/chpid.h>
5#include <asm/schid.h> 5#include <asm/schid.h>
6#include "orb.h"
7#include "cio.h"
6 8
7/* 9/*
8 * TPI info structure 10 * TPI info structure
@@ -87,6 +89,38 @@ static inline int tsch(struct subchannel_id schid, struct irb *addr)
87 return ccode; 89 return ccode;
88} 90}
89 91
92static inline int ssch(struct subchannel_id schid, union orb *addr)
93{
94 register struct subchannel_id reg1 asm("1") = schid;
95 int ccode = -EIO;
96
97 asm volatile(
98 " ssch 0(%2)\n"
99 "0: ipm %0\n"
100 " srl %0,28\n"
101 "1:\n"
102 EX_TABLE(0b, 1b)
103 : "+d" (ccode)
104 : "d" (reg1), "a" (addr), "m" (*addr)
105 : "cc", "memory");
106 return ccode;
107}
108
109static inline int csch(struct subchannel_id schid)
110{
111 register struct subchannel_id reg1 asm("1") = schid;
112 int ccode;
113
114 asm volatile(
115 " csch\n"
116 " ipm %0\n"
117 " srl %0,28"
118 : "=d" (ccode)
119 : "d" (reg1)
120 : "cc");
121 return ccode;
122}
123
90static inline int tpi(struct tpi_info *addr) 124static inline int tpi(struct tpi_info *addr)
91{ 125{
92 int ccode; 126 int ccode;