summaryrefslogtreecommitdiff
path: root/drivers/s390/cio/ioasm.h
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2011-03-15 16:08:24 (GMT)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2011-03-15 16:08:23 (GMT)
commitdbda8ce5407c731a0108a35db3e058d5d350dd80 (patch)
tree3bcf6fbb2d8e0e501c73fe718b6c23ee20b0a06b /drivers/s390/cio/ioasm.h
parent9e6f9f851cfa41f42f8985e0b82a54b1b28d3465 (diff)
downloadlinux-dbda8ce5407c731a0108a35db3e058d5d350dd80.tar.xz
[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/ioasm.h')
-rw-r--r--drivers/s390/cio/ioasm.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/s390/cio/ioasm.h b/drivers/s390/cio/ioasm.h
index fac0615..4d80fc6 100644
--- a/drivers/s390/cio/ioasm.h
+++ b/drivers/s390/cio/ioasm.h
@@ -3,6 +3,8 @@
#include <asm/chpid.h>
#include <asm/schid.h>
+#include "orb.h"
+#include "cio.h"
/*
* TPI info structure
@@ -87,6 +89,38 @@ static inline int tsch(struct subchannel_id schid, struct irb *addr)
return ccode;
}
+static inline int ssch(struct subchannel_id schid, union orb *addr)
+{
+ register struct subchannel_id reg1 asm("1") = schid;
+ int ccode = -EIO;
+
+ asm volatile(
+ " ssch 0(%2)\n"
+ "0: ipm %0\n"
+ " srl %0,28\n"
+ "1:\n"
+ EX_TABLE(0b, 1b)
+ : "+d" (ccode)
+ : "d" (reg1), "a" (addr), "m" (*addr)
+ : "cc", "memory");
+ return ccode;
+}
+
+static inline int csch(struct subchannel_id schid)
+{
+ register struct subchannel_id reg1 asm("1") = schid;
+ int ccode;
+
+ asm volatile(
+ " csch\n"
+ " ipm %0\n"
+ " srl %0,28"
+ : "=d" (ccode)
+ : "d" (reg1)
+ : "cc");
+ return ccode;
+}
+
static inline int tpi(struct tpi_info *addr)
{
int ccode;