Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/cio: Remove unused inline assemblies

There is no longer a need to maintain two versions of the same inline
assembly - one with exception handling, and one without - so get rid of
the duplicates and adjust names accordingly. This applies to stsch_err
and msch_err which are now renamed to stsch and msch respectively,
while the original msch function is removed.

Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Peter Oberparleiter and committed by
Martin Schwidefsky
62e65da9 d7ae65ae

+16 -31
+1 -1
drivers/s390/cio/chsc_sch.c
··· 133 133 * since we don't have a way to clear the subchannel and 134 134 * cannot disable it with a request running. 135 135 */ 136 - cc = stsch_err(sch->schid, &schib); 136 + cc = stsch(sch->schid, &schib); 137 137 if (!cc && scsw_stctl(&schib.scsw)) 138 138 return -EAGAIN; 139 139 return 0;
+12 -12
drivers/s390/cio/cio.c
··· 345 345 struct schib schib; 346 346 struct irb irb; 347 347 348 - if (stsch_err(sch->schid, &schib) || !css_sch_is_valid(&schib)) 348 + if (stsch(sch->schid, &schib) || !css_sch_is_valid(&schib)) 349 349 return -ENODEV; 350 350 351 351 for (retry = 0; retry < 5; retry++) { 352 352 /* copy desired changes to local schib */ 353 353 cio_apply_config(sch, &schib); 354 - ccode = msch_err(sch->schid, &schib); 354 + ccode = msch(sch->schid, &schib); 355 355 if (ccode < 0) /* -EIO if msch gets a program check. */ 356 356 return ccode; 357 357 switch (ccode) { 358 358 case 0: /* successful */ 359 - if (stsch_err(sch->schid, &schib) || 359 + if (stsch(sch->schid, &schib) || 360 360 !css_sch_is_valid(&schib)) 361 361 return -ENODEV; 362 362 if (cio_check_config(sch, &schib)) { ··· 391 391 { 392 392 struct schib schib; 393 393 394 - if (stsch_err(sch->schid, &schib) || !css_sch_is_valid(&schib)) 394 + if (stsch(sch->schid, &schib) || !css_sch_is_valid(&schib)) 395 395 return -ENODEV; 396 396 397 397 memcpy(&sch->schib, &schib, sizeof(schib)); ··· 500 500 * If stsch gets an exception, it means the current subchannel set 501 501 * is not valid. 502 502 */ 503 - ccode = stsch_err(schid, &sch->schib); 503 + ccode = stsch(schid, &sch->schib); 504 504 if (ccode) { 505 505 err = (ccode == 3) ? -ENXIO : ccode; 506 506 goto out; ··· 616 616 { 617 617 struct schib schib; 618 618 619 - if (stsch_err(schid, &schib) != 0) 619 + if (stsch(schid, &schib) != 0) 620 620 return -ENXIO; 621 621 if ((schib.pmcw.st == SUBCHANNEL_TYPE_IO) && schib.pmcw.dnv && 622 622 (schib.pmcw.dev == console_devno)) { ··· 635 635 if (console_irq != -1) { 636 636 /* VM provided us with the irq number of the console. */ 637 637 schid.sch_no = console_irq; 638 - if (stsch_err(schid, &schib) != 0 || 638 + if (stsch(schid, &schib) != 0 || 639 639 (schib.pmcw.st != SUBCHANNEL_TYPE_IO) || !schib.pmcw.dnv) 640 640 return -1; 641 641 console_devno = schib.pmcw.dev; ··· 705 705 cc = 0; 706 706 for (retry=0;retry<3;retry++) { 707 707 schib->pmcw.ena = 0; 708 - cc = msch_err(schid, schib); 708 + cc = msch(schid, schib); 709 709 if (cc) 710 710 return (cc==3?-ENODEV:-EBUSY); 711 - if (stsch_err(schid, schib) || !css_sch_is_valid(schib)) 711 + if (stsch(schid, schib) || !css_sch_is_valid(schib)) 712 712 return -ENODEV; 713 713 if (!schib->pmcw.ena) 714 714 return 0; ··· 755 755 756 756 pgm_check_occured = 0; 757 757 s390_base_pgm_handler_fn = cio_reset_pgm_check_handler; 758 - rc = stsch_err(schid, addr); 758 + rc = stsch(schid, addr); 759 759 s390_base_pgm_handler_fn = NULL; 760 760 761 761 /* The program check handler could have changed pgm_check_occured. */ ··· 792 792 /* No default clear strategy */ 793 793 break; 794 794 } 795 - stsch_err(schid, &schib); 795 + stsch(schid, &schib); 796 796 __disable_subchannel_easy(schid, &schib); 797 797 } 798 798 out: ··· 940 940 if (__chsc_enable_facility(&sda_area, CHSC_SDA_OC_MSS)) 941 941 return -ENODEV; 942 942 } 943 - if (stsch_err(schid, &schib)) 943 + if (stsch(schid, &schib)) 944 944 return -ENODEV; 945 945 if (schib.pmcw.st != SUBCHANNEL_TYPE_IO) 946 946 return -ENODEV;
+1 -1
drivers/s390/cio/css.c
··· 390 390 /* Will be done on the slow path. */ 391 391 return -EAGAIN; 392 392 } 393 - if (stsch_err(schid, &schib)) { 393 + if (stsch(schid, &schib)) { 394 394 /* Subchannel is not provided. */ 395 395 return -ENXIO; 396 396 }
+1 -1
drivers/s390/cio/device_fsm.c
··· 44 44 sch = to_subchannel(cdev->dev.parent); 45 45 private = to_io_private(sch); 46 46 orb = &private->orb; 47 - cc = stsch_err(sch->schid, &schib); 47 + cc = stsch(sch->schid, &schib); 48 48 49 49 printk(KERN_WARNING "cio: ccw device timeout occurred at %llx, " 50 50 "device information:\n", get_tod_clock());
+1 -16
drivers/s390/cio/ioasm.h
··· 25 25 * Some S390 specific IO instructions as inline 26 26 */ 27 27 28 - static inline int stsch_err(struct subchannel_id schid, struct schib *addr) 28 + static inline int stsch(struct subchannel_id schid, struct schib *addr) 29 29 { 30 30 register struct subchannel_id reg1 asm ("1") = schid; 31 31 int ccode = -EIO; ··· 43 43 } 44 44 45 45 static inline int msch(struct subchannel_id schid, struct schib *addr) 46 - { 47 - register struct subchannel_id reg1 asm ("1") = schid; 48 - int ccode; 49 - 50 - asm volatile( 51 - " msch 0(%2)\n" 52 - " ipm %0\n" 53 - " srl %0,28" 54 - : "=d" (ccode) 55 - : "d" (reg1), "a" (addr), "m" (*addr) 56 - : "cc"); 57 - return ccode; 58 - } 59 - 60 - static inline int msch_err(struct subchannel_id schid, struct schib *addr) 61 46 { 62 47 register struct subchannel_id reg1 asm ("1") = schid; 63 48 int ccode = -EIO;