aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/cio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/cio.c')
-rw-r--r--drivers/s390/cio/cio.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
index 138124fcfcad..5feea1a371e1 100644
--- a/drivers/s390/cio/cio.c
+++ b/drivers/s390/cio/cio.c
@@ -361,7 +361,7 @@ int cio_commit_config(struct subchannel *sch)
361 struct schib schib; 361 struct schib schib;
362 int ccode, retry, ret = 0; 362 int ccode, retry, ret = 0;
363 363
364 if (stsch(sch->schid, &schib) || !css_sch_is_valid(&schib)) 364 if (stsch_err(sch->schid, &schib) || !css_sch_is_valid(&schib))
365 return -ENODEV; 365 return -ENODEV;
366 366
367 for (retry = 0; retry < 5; retry++) { 367 for (retry = 0; retry < 5; retry++) {
@@ -372,7 +372,7 @@ int cio_commit_config(struct subchannel *sch)
372 return ccode; 372 return ccode;
373 switch (ccode) { 373 switch (ccode) {
374 case 0: /* successful */ 374 case 0: /* successful */
375 if (stsch(sch->schid, &schib) || 375 if (stsch_err(sch->schid, &schib) ||
376 !css_sch_is_valid(&schib)) 376 !css_sch_is_valid(&schib))
377 return -ENODEV; 377 return -ENODEV;
378 if (cio_check_config(sch, &schib)) { 378 if (cio_check_config(sch, &schib)) {
@@ -404,7 +404,7 @@ int cio_update_schib(struct subchannel *sch)
404{ 404{
405 struct schib schib; 405 struct schib schib;
406 406
407 if (stsch(sch->schid, &schib) || !css_sch_is_valid(&schib)) 407 if (stsch_err(sch->schid, &schib) || !css_sch_is_valid(&schib))
408 return -ENODEV; 408 return -ENODEV;
409 409
410 memcpy(&sch->schib, &schib, sizeof(schib)); 410 memcpy(&sch->schib, &schib, sizeof(schib));
@@ -618,14 +618,15 @@ void __irq_entry do_IRQ(struct pt_regs *regs)
618 old_regs = set_irq_regs(regs); 618 old_regs = set_irq_regs(regs);
619 s390_idle_check(); 619 s390_idle_check();
620 irq_enter(); 620 irq_enter();
621 __get_cpu_var(s390_idle).nohz_delay = 1;
621 if (S390_lowcore.int_clock >= S390_lowcore.clock_comparator) 622 if (S390_lowcore.int_clock >= S390_lowcore.clock_comparator)
622 /* Serve timer interrupts first. */ 623 /* Serve timer interrupts first. */
623 clock_comparator_work(); 624 clock_comparator_work();
624 /* 625 /*
625 * Get interrupt information from lowcore 626 * Get interrupt information from lowcore
626 */ 627 */
627 tpi_info = (struct tpi_info *) __LC_SUBCHANNEL_ID; 628 tpi_info = (struct tpi_info *)&S390_lowcore.subchannel_id;
628 irb = (struct irb *) __LC_IRB; 629 irb = (struct irb *)&S390_lowcore.irb;
629 do { 630 do {
630 kstat_cpu(smp_processor_id()).irqs[IO_INTERRUPT]++; 631 kstat_cpu(smp_processor_id()).irqs[IO_INTERRUPT]++;
631 /* 632 /*
@@ -660,7 +661,7 @@ void __irq_entry do_IRQ(struct pt_regs *regs)
660 * We don't do this for VM because a tpi drops the cpu 661 * We don't do this for VM because a tpi drops the cpu
661 * out of the sie which costs more cycles than it saves. 662 * out of the sie which costs more cycles than it saves.
662 */ 663 */
663 } while (!MACHINE_IS_VM && tpi (NULL) != 0); 664 } while (MACHINE_IS_LPAR && tpi(NULL) != 0);
664 irq_exit(); 665 irq_exit();
665 set_irq_regs(old_regs); 666 set_irq_regs(old_regs);
666} 667}
@@ -681,10 +682,10 @@ static int cio_tpi(void)
681 struct irb *irb; 682 struct irb *irb;
682 int irq_context; 683 int irq_context;
683 684
684 tpi_info = (struct tpi_info *) __LC_SUBCHANNEL_ID; 685 tpi_info = (struct tpi_info *)&S390_lowcore.subchannel_id;
685 if (tpi(NULL) != 1) 686 if (tpi(NULL) != 1)
686 return 0; 687 return 0;
687 irb = (struct irb *) __LC_IRB; 688 irb = (struct irb *)&S390_lowcore.irb;
688 /* Store interrupt response block to lowcore. */ 689 /* Store interrupt response block to lowcore. */
689 if (tsch(tpi_info->schid, irb) != 0) 690 if (tsch(tpi_info->schid, irb) != 0)
690 /* Not status pending or not operational. */ 691 /* Not status pending or not operational. */
@@ -770,7 +771,7 @@ cio_get_console_sch_no(void)
770 if (console_irq != -1) { 771 if (console_irq != -1) {
771 /* VM provided us with the irq number of the console. */ 772 /* VM provided us with the irq number of the console. */
772 schid.sch_no = console_irq; 773 schid.sch_no = console_irq;
773 if (stsch(schid, &console_subchannel.schib) != 0 || 774 if (stsch_err(schid, &console_subchannel.schib) != 0 ||
774 (console_subchannel.schib.pmcw.st != SUBCHANNEL_TYPE_IO) || 775 (console_subchannel.schib.pmcw.st != SUBCHANNEL_TYPE_IO) ||
775 !console_subchannel.schib.pmcw.dnv) 776 !console_subchannel.schib.pmcw.dnv)
776 return -1; 777 return -1;
@@ -862,10 +863,10 @@ __disable_subchannel_easy(struct subchannel_id schid, struct schib *schib)
862 cc = 0; 863 cc = 0;
863 for (retry=0;retry<3;retry++) { 864 for (retry=0;retry<3;retry++) {
864 schib->pmcw.ena = 0; 865 schib->pmcw.ena = 0;
865 cc = msch(schid, schib); 866 cc = msch_err(schid, schib);
866 if (cc) 867 if (cc)
867 return (cc==3?-ENODEV:-EBUSY); 868 return (cc==3?-ENODEV:-EBUSY);
868 if (stsch(schid, schib) || !css_sch_is_valid(schib)) 869 if (stsch_err(schid, schib) || !css_sch_is_valid(schib))
869 return -ENODEV; 870 return -ENODEV;
870 if (!schib->pmcw.ena) 871 if (!schib->pmcw.ena)
871 return 0; 872 return 0;
@@ -884,7 +885,7 @@ __clear_io_subchannel_easy(struct subchannel_id schid)
884 struct tpi_info ti; 885 struct tpi_info ti;
885 886
886 if (tpi(&ti)) { 887 if (tpi(&ti)) {
887 tsch(ti.schid, (struct irb *)__LC_IRB); 888 tsch(ti.schid, (struct irb *)&S390_lowcore.irb);
888 if (schid_equal(&ti.schid, &schid)) 889 if (schid_equal(&ti.schid, &schid))
889 return 0; 890 return 0;
890 } 891 }
@@ -912,7 +913,7 @@ static int stsch_reset(struct subchannel_id schid, struct schib *addr)
912 913
913 pgm_check_occured = 0; 914 pgm_check_occured = 0;
914 s390_base_pgm_handler_fn = cio_reset_pgm_check_handler; 915 s390_base_pgm_handler_fn = cio_reset_pgm_check_handler;
915 rc = stsch(schid, addr); 916 rc = stsch_err(schid, addr);
916 s390_base_pgm_handler_fn = NULL; 917 s390_base_pgm_handler_fn = NULL;
917 918
918 /* The program check handler could have changed pgm_check_occured. */ 919 /* The program check handler could have changed pgm_check_occured. */
@@ -949,7 +950,7 @@ static int __shutdown_subchannel_easy(struct subchannel_id schid, void *data)
949 /* No default clear strategy */ 950 /* No default clear strategy */
950 break; 951 break;
951 } 952 }
952 stsch(schid, &schib); 953 stsch_err(schid, &schib);
953 __disable_subchannel_easy(schid, &schib); 954 __disable_subchannel_easy(schid, &schib);
954 } 955 }
955out: 956out:
@@ -1082,10 +1083,10 @@ int __init cio_get_iplinfo(struct cio_iplinfo *iplinfo)
1082 struct subchannel_id schid; 1083 struct subchannel_id schid;
1083 struct schib schib; 1084 struct schib schib;
1084 1085
1085 schid = *(struct subchannel_id *)__LC_SUBCHANNEL_ID; 1086 schid = *(struct subchannel_id *)&S390_lowcore.subchannel_id;
1086 if (!schid.one) 1087 if (!schid.one)
1087 return -ENODEV; 1088 return -ENODEV;
1088 if (stsch(schid, &schib)) 1089 if (stsch_err(schid, &schib))
1089 return -ENODEV; 1090 return -ENODEV;
1090 if (schib.pmcw.st != SUBCHANNEL_TYPE_IO) 1091 if (schib.pmcw.st != SUBCHANNEL_TYPE_IO)
1091 return -ENODEV; 1092 return -ENODEV;