Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[powerpc.git] / drivers / s390 / cio / ioasm.h
index 66c882e..95a9462 100644 (file)
@@ -38,6 +38,35 @@ static inline int stsch(struct subchannel_id schid,
        return ccode;
 }
 
+static inline int stsch_err(struct subchannel_id schid,
+                               volatile struct schib *addr)
+{
+       int ccode;
+
+       __asm__ __volatile__(
+               "    lhi  %0,%3\n"
+               "    lr   1,%1\n"
+               "    stsch 0(%2)\n"
+               "0:  ipm  %0\n"
+               "    srl  %0,28\n"
+               "1:\n"
+#ifdef CONFIG_64BIT
+               ".section __ex_table,\"a\"\n"
+               "   .align 8\n"
+               "   .quad 0b,1b\n"
+               ".previous"
+#else
+               ".section __ex_table,\"a\"\n"
+               "   .align 4\n"
+               "   .long 0b,1b\n"
+               ".previous"
+#endif
+               : "=&d" (ccode)
+               : "d" (schid), "a" (addr), "K" (-EIO), "m" (*addr)
+               : "cc", "1" );
+       return ccode;
+}
+
 static inline int msch(struct subchannel_id schid,
                           volatile struct schib *addr)
 {
@@ -66,7 +95,7 @@ static inline int msch_err(struct subchannel_id schid,
                "0:  ipm  %0\n"
                "    srl  %0,28\n"
                "1:\n"
-#ifdef CONFIG_ARCH_S390X
+#ifdef CONFIG_64BIT
                ".section __ex_table,\"a\"\n"
                "   .align 8\n"
                "   .quad 0b,1b\n"