]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[S390] cio: move asms to generic header
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Tue, 15 Mar 2011 16:08:24 +0000 (17:08 +0100)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Tue, 15 Mar 2011 16:08:23 +0000 (17:08 +0100)
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>
drivers/s390/cio/io_sch.h
drivers/s390/cio/ioasm.h

index 20e7a1b127cee33692bd6f4fd300914664a720d9..36870d9f108adf01679f36cff7ac2dc8bbe9ebb3 100644 (file)
@@ -139,23 +139,6 @@ struct ccw_device_private {
        void *cmb_wait;                 /* deferred cmb enable/disable */
 };
 
-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 rsch(struct subchannel_id schid)
 {
        register struct subchannel_id reg1 asm("1") = schid;
@@ -171,21 +154,6 @@ static inline int rsch(struct subchannel_id schid)
        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 hsch(struct subchannel_id schid)
 {
        register struct subchannel_id reg1 asm("1") = schid;
index fac06155773f11864041bc4cca74dd742e270579..4d80fc67a06b140639b6410f2668ff21e21e545f 100644 (file)
@@ -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;