diff options
Diffstat (limited to 'drivers/s390/char/vmur.c')
-rw-r--r-- | drivers/s390/char/vmur.c | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/drivers/s390/char/vmur.c b/drivers/s390/char/vmur.c index 04b19bdc09da..2d96c958df64 100644 --- a/drivers/s390/char/vmur.c +++ b/drivers/s390/char/vmur.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <asm/cio.h> | 14 | #include <asm/cio.h> |
15 | #include <asm/ccwdev.h> | 15 | #include <asm/ccwdev.h> |
16 | #include <asm/debug.h> | 16 | #include <asm/debug.h> |
17 | #include <asm/diag.h> | ||
17 | 18 | ||
18 | #include "vmur.h" | 19 | #include "vmur.h" |
19 | 20 | ||
@@ -379,31 +380,6 @@ static ssize_t ur_write(struct file *file, const char __user *udata, | |||
379 | return do_write(urf->urd, udata, count, urf->dev_reclen, ppos); | 380 | return do_write(urf->urd, udata, count, urf->dev_reclen, ppos); |
380 | } | 381 | } |
381 | 382 | ||
382 | static int do_diag_14(unsigned long rx, unsigned long ry1, | ||
383 | unsigned long subcode) | ||
384 | { | ||
385 | register unsigned long _ry1 asm("2") = ry1; | ||
386 | register unsigned long _ry2 asm("3") = subcode; | ||
387 | int rc = 0; | ||
388 | |||
389 | asm volatile( | ||
390 | #ifdef CONFIG_64BIT | ||
391 | " sam31\n" | ||
392 | " diag %2,2,0x14\n" | ||
393 | " sam64\n" | ||
394 | #else | ||
395 | " diag %2,2,0x14\n" | ||
396 | #endif | ||
397 | " ipm %0\n" | ||
398 | " srl %0,28\n" | ||
399 | : "=d" (rc), "+d" (_ry2) | ||
400 | : "d" (rx), "d" (_ry1) | ||
401 | : "cc"); | ||
402 | |||
403 | TRACE("diag 14: subcode=0x%lx, cc=%i\n", subcode, rc); | ||
404 | return rc; | ||
405 | } | ||
406 | |||
407 | /* | 383 | /* |
408 | * diagnose code 0x14 subcode 0x0028 - position spool file to designated | 384 | * diagnose code 0x14 subcode 0x0028 - position spool file to designated |
409 | * record | 385 | * record |
@@ -415,7 +391,7 @@ static int diag_position_to_record(int devno, int record) | |||
415 | { | 391 | { |
416 | int cc; | 392 | int cc; |
417 | 393 | ||
418 | cc = do_diag_14(record, devno, 0x28); | 394 | cc = diag14(record, devno, 0x28); |
419 | switch (cc) { | 395 | switch (cc) { |
420 | case 0: | 396 | case 0: |
421 | return 0; | 397 | return 0; |
@@ -440,7 +416,7 @@ static int diag_read_file(int devno, char *buf) | |||
440 | { | 416 | { |
441 | int cc; | 417 | int cc; |
442 | 418 | ||
443 | cc = do_diag_14((unsigned long) buf, devno, 0x00); | 419 | cc = diag14((unsigned long) buf, devno, 0x00); |
444 | switch (cc) { | 420 | switch (cc) { |
445 | case 0: | 421 | case 0: |
446 | return 0; | 422 | return 0; |
@@ -533,7 +509,7 @@ static int diag_read_next_file_info(struct file_control_block *buf, int spid) | |||
533 | { | 509 | { |
534 | int cc; | 510 | int cc; |
535 | 511 | ||
536 | cc = do_diag_14((unsigned long) buf, spid, 0xfff); | 512 | cc = diag14((unsigned long) buf, spid, 0xfff); |
537 | switch (cc) { | 513 | switch (cc) { |
538 | case 0: | 514 | case 0: |
539 | return 0; | 515 | return 0; |