cio.c (dca3a783400a18e2bf4503b1d4a85c4d0ca1a7e4) | cio.c (188561a462d3b82451d6ba09e2e32c9ba2c9938c) |
---|---|
1/* 2 * S/390 common I/O routines -- low level i/o calls 3 * 4 * Copyright IBM Corp. 1999, 2008 5 * Author(s): Ingo Adlung (adlung@de.ibm.com) 6 * Cornelia Huck (cornelia.huck@de.ibm.com) 7 * Arnd Bergmann (arndb@de.ibm.com) 8 * Martin Schwidefsky (schwidefsky@de.ibm.com) --- 642 unchanged lines hidden (view full) --- 651 652#ifdef CONFIG_CCW_CONSOLE 653static struct subchannel console_subchannel; 654static struct io_subchannel_private console_priv; 655static int console_subchannel_in_use; 656 657/* 658 * Use cio_tsch to update the subchannel status and call the interrupt handler | 1/* 2 * S/390 common I/O routines -- low level i/o calls 3 * 4 * Copyright IBM Corp. 1999, 2008 5 * Author(s): Ingo Adlung (adlung@de.ibm.com) 6 * Cornelia Huck (cornelia.huck@de.ibm.com) 7 * Arnd Bergmann (arndb@de.ibm.com) 8 * Martin Schwidefsky (schwidefsky@de.ibm.com) --- 642 unchanged lines hidden (view full) --- 651 652#ifdef CONFIG_CCW_CONSOLE 653static struct subchannel console_subchannel; 654static struct io_subchannel_private console_priv; 655static int console_subchannel_in_use; 656 657/* 658 * Use cio_tsch to update the subchannel status and call the interrupt handler |
659 * if status had been pending. Called with the console_subchannel lock. | 659 * if status had been pending. Called with the subchannel's lock held. |
660 */ | 660 */ |
661static void cio_tsch(struct subchannel *sch) | 661void cio_tsch(struct subchannel *sch) |
662{ 663 struct irb *irb; 664 int irq_context; 665 666 irb = (struct irb *)&S390_lowcore.irb; 667 /* Store interrupt response block to lowcore. */ 668 if (tsch(sch->schid, irb) != 0) 669 /* Not status pending or not operational. */ --- 15 unchanged lines hidden (view full) --- 685 } 686} 687 688void *cio_get_console_priv(void) 689{ 690 return &console_priv; 691} 692 | 662{ 663 struct irb *irb; 664 int irq_context; 665 666 irb = (struct irb *)&S390_lowcore.irb; 667 /* Store interrupt response block to lowcore. */ 668 if (tsch(sch->schid, irb) != 0) 669 /* Not status pending or not operational. */ --- 15 unchanged lines hidden (view full) --- 685 } 686} 687 688void *cio_get_console_priv(void) 689{ 690 return &console_priv; 691} 692 |
693/* 694 * busy wait for the next interrupt on the console 695 */ 696void wait_cons_dev(void) 697{ 698 if (!console_subchannel_in_use) 699 return; 700 701 while (1) { 702 cio_tsch(&console_subchannel); 703 if (console_subchannel.schib.scsw.cmd.actl == 0) 704 break; 705 udelay_simple(100); 706 } 707} 708 | |
709static int 710cio_test_for_console(struct subchannel_id schid, void *data) 711{ 712 if (stsch_err(schid, &console_subchannel.schib) != 0) 713 return -ENXIO; 714 if ((console_subchannel.schib.pmcw.st == SUBCHANNEL_TYPE_IO) && 715 console_subchannel.schib.pmcw.dnv && 716 (console_subchannel.schib.pmcw.dev == console_devno)) { --- 399 unchanged lines hidden --- | 693static int 694cio_test_for_console(struct subchannel_id schid, void *data) 695{ 696 if (stsch_err(schid, &console_subchannel.schib) != 0) 697 return -ENXIO; 698 if ((console_subchannel.schib.pmcw.st == SUBCHANNEL_TYPE_IO) && 699 console_subchannel.schib.pmcw.dnv && 700 (console_subchannel.schib.pmcw.dev == console_devno)) { --- 399 unchanged lines hidden --- |