diff options
Diffstat (limited to 'drivers/s390/cio/device_id.c')
-rw-r--r-- | drivers/s390/cio/device_id.c | 48 |
1 files changed, 1 insertions, 47 deletions
diff --git a/drivers/s390/cio/device_id.c b/drivers/s390/cio/device_id.c index 60b9347f7c92..f232832f2b22 100644 --- a/drivers/s390/cio/device_id.c +++ b/drivers/s390/cio/device_id.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <asm/delay.h> | 17 | #include <asm/delay.h> |
18 | #include <asm/cio.h> | 18 | #include <asm/cio.h> |
19 | #include <asm/lowcore.h> | 19 | #include <asm/lowcore.h> |
20 | #include <asm/diag.h> | ||
20 | 21 | ||
21 | #include "cio.h" | 22 | #include "cio.h" |
22 | #include "cio_debug.h" | 23 | #include "cio_debug.h" |
@@ -25,51 +26,6 @@ | |||
25 | #include "ioasm.h" | 26 | #include "ioasm.h" |
26 | 27 | ||
27 | /* | 28 | /* |
28 | * diag210 is used under VM to get information about a virtual device | ||
29 | */ | ||
30 | int | ||
31 | diag210(struct diag210 * addr) | ||
32 | { | ||
33 | /* | ||
34 | * diag 210 needs its data below the 2GB border, so we | ||
35 | * use a static data area to be sure | ||
36 | */ | ||
37 | static struct diag210 diag210_tmp; | ||
38 | static DEFINE_SPINLOCK(diag210_lock); | ||
39 | unsigned long flags; | ||
40 | int ccode; | ||
41 | |||
42 | spin_lock_irqsave(&diag210_lock, flags); | ||
43 | diag210_tmp = *addr; | ||
44 | |||
45 | #ifdef CONFIG_64BIT | ||
46 | asm volatile( | ||
47 | " lhi %0,-1\n" | ||
48 | " sam31\n" | ||
49 | " diag %1,0,0x210\n" | ||
50 | "0: ipm %0\n" | ||
51 | " srl %0,28\n" | ||
52 | "1: sam64\n" | ||
53 | EX_TABLE(0b,1b) | ||
54 | : "=&d" (ccode) : "a" (&diag210_tmp) : "cc", "memory"); | ||
55 | #else | ||
56 | asm volatile( | ||
57 | " lhi %0,-1\n" | ||
58 | " diag %1,0,0x210\n" | ||
59 | "0: ipm %0\n" | ||
60 | " srl %0,28\n" | ||
61 | "1:\n" | ||
62 | EX_TABLE(0b,1b) | ||
63 | : "=&d" (ccode) : "a" (&diag210_tmp) : "cc", "memory"); | ||
64 | #endif | ||
65 | |||
66 | *addr = diag210_tmp; | ||
67 | spin_unlock_irqrestore(&diag210_lock, flags); | ||
68 | |||
69 | return ccode; | ||
70 | } | ||
71 | |||
72 | /* | ||
73 | * Input : | 29 | * Input : |
74 | * devno - device number | 30 | * devno - device number |
75 | * ps - pointer to sense ID data area | 31 | * ps - pointer to sense ID data area |
@@ -349,5 +305,3 @@ ccw_device_sense_id_irq(struct ccw_device *cdev, enum dev_event dev_event) | |||
349 | break; | 305 | break; |
350 | } | 306 | } |
351 | } | 307 | } |
352 | |||
353 | EXPORT_SYMBOL(diag210); | ||