[S390] vmur: fix diag14 exceptions with addresses > 2GB.
[powerpc.git] / drivers / s390 / cio / device_id.c
index 60b9347..f232832 100644 (file)
@@ -17,6 +17,7 @@
 #include <asm/delay.h>
 #include <asm/cio.h>
 #include <asm/lowcore.h>
+#include <asm/diag.h>
 
 #include "cio.h"
 #include "cio_debug.h"
 #include "device.h"
 #include "ioasm.h"
 
-/*
- * diag210 is used under VM to get information about a virtual device
- */
-int
-diag210(struct diag210 * addr)
-{
-       /*
-        * diag 210 needs its data below the 2GB border, so we
-        * use a static data area to be sure
-        */
-       static struct diag210 diag210_tmp;
-       static DEFINE_SPINLOCK(diag210_lock);
-       unsigned long flags;
-       int ccode;
-
-       spin_lock_irqsave(&diag210_lock, flags);
-       diag210_tmp = *addr;
-
-#ifdef CONFIG_64BIT
-       asm volatile(
-               "       lhi     %0,-1\n"
-               "       sam31\n"
-               "       diag    %1,0,0x210\n"
-               "0:     ipm     %0\n"
-               "       srl     %0,28\n"
-               "1:     sam64\n"
-               EX_TABLE(0b,1b)
-               : "=&d" (ccode) : "a" (&diag210_tmp) : "cc", "memory");
-#else
-       asm volatile(
-               "       lhi     %0,-1\n"
-               "       diag    %1,0,0x210\n"
-               "0:     ipm     %0\n"
-               "       srl     %0,28\n"
-               "1:\n"
-               EX_TABLE(0b,1b)
-               : "=&d" (ccode) : "a" (&diag210_tmp) : "cc", "memory");
-#endif
-
-       *addr = diag210_tmp;
-       spin_unlock_irqrestore(&diag210_lock, flags);
-
-       return ccode;
-}
-
 /*
  * Input :
  *   devno - device number
@@ -349,5 +305,3 @@ ccw_device_sense_id_irq(struct ccw_device *cdev, enum dev_event dev_event)
                break;
        }
 }
-
-EXPORT_SYMBOL(diag210);