diff options
| author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2008-07-14 03:58:58 -0400 |
|---|---|---|
| committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-07-14 04:02:10 -0400 |
| commit | 3a3fc29a6d0626fb4897b7391c4e956efbacd394 (patch) | |
| tree | 7107a7883f44c6350d8d85bab7a1871b6cb342e6 | |
| parent | 75784c00876c88ca6e955c39cbb5d47cf408fd3c (diff) | |
[S390] cio: Introduce abstract isc definitions.
Replace the numeric values for I/O interruption subclass usage
with abstract definitions and collect them all in asm/isc.h.
This gives us a better overview of which iscs are actually used
and makes it possible to better spread out isc usage in the
future.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| -rw-r--r-- | drivers/s390/cio/cio.c | 13 | ||||
| -rw-r--r-- | drivers/s390/cio/css.c | 4 | ||||
| -rw-r--r-- | drivers/s390/cio/device.c | 3 | ||||
| -rw-r--r-- | drivers/s390/cio/qdio.h | 3 | ||||
| -rw-r--r-- | include/asm-s390/isc.h | 18 |
5 files changed, 32 insertions, 9 deletions
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index c24dfcd858da..a4f9130910d6 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <asm/ipl.h> | 24 | #include <asm/ipl.h> |
| 25 | #include <asm/chpid.h> | 25 | #include <asm/chpid.h> |
| 26 | #include <asm/airq.h> | 26 | #include <asm/airq.h> |
| 27 | #include <asm/isc.h> | ||
| 27 | #include <asm/cpu.h> | 28 | #include <asm/cpu.h> |
| 28 | #include <asm/fcx.h> | 29 | #include <asm/fcx.h> |
| 29 | #include "cio.h" | 30 | #include "cio.h" |
| @@ -699,9 +700,9 @@ void wait_cons_dev(void) | |||
| 699 | if (!console_subchannel_in_use) | 700 | if (!console_subchannel_in_use) |
| 700 | return; | 701 | return; |
| 701 | 702 | ||
| 702 | /* disable all but isc 1 (console device) */ | 703 | /* disable all but the console isc */ |
| 703 | __ctl_store (save_cr6, 6, 6); | 704 | __ctl_store (save_cr6, 6, 6); |
| 704 | cr6 = 0x40000000; | 705 | cr6 = 1UL << (31 - CONSOLE_ISC); |
| 705 | __ctl_load (cr6, 6, 6); | 706 | __ctl_load (cr6, 6, 6); |
| 706 | 707 | ||
| 707 | do { | 708 | do { |
| @@ -783,10 +784,10 @@ cio_probe_console(void) | |||
| 783 | } | 784 | } |
| 784 | 785 | ||
| 785 | /* | 786 | /* |
| 786 | * enable console I/O-interrupt subclass 1 | 787 | * enable console I/O-interrupt subclass |
| 787 | */ | 788 | */ |
| 788 | ctl_set_bit(6, 30); | 789 | ctl_set_bit(6, 31 - CONSOLE_ISC); |
| 789 | console_subchannel.schib.pmcw.isc = 1; | 790 | console_subchannel.schib.pmcw.isc = CONSOLE_ISC; |
| 790 | console_subchannel.schib.pmcw.intparm = | 791 | console_subchannel.schib.pmcw.intparm = |
| 791 | (u32)(addr_t)&console_subchannel; | 792 | (u32)(addr_t)&console_subchannel; |
| 792 | ret = cio_modify(&console_subchannel); | 793 | ret = cio_modify(&console_subchannel); |
| @@ -802,7 +803,7 @@ cio_release_console(void) | |||
| 802 | { | 803 | { |
| 803 | console_subchannel.schib.pmcw.intparm = 0; | 804 | console_subchannel.schib.pmcw.intparm = 0; |
| 804 | cio_modify(&console_subchannel); | 805 | cio_modify(&console_subchannel); |
| 805 | ctl_clear_bit(6, 30); | 806 | ctl_clear_bit(6, 31 - CONSOLE_ISC); |
| 806 | console_subchannel_in_use = 0; | 807 | console_subchannel_in_use = 0; |
| 807 | } | 808 | } |
| 808 | 809 | ||
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index ebed2212778d..b24618b5362e 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
| 14 | #include <linux/list.h> | 14 | #include <linux/list.h> |
| 15 | #include <linux/reboot.h> | 15 | #include <linux/reboot.h> |
| 16 | #include <asm/isc.h> | ||
| 16 | 17 | ||
| 17 | #include "../s390mach.h" | 18 | #include "../s390mach.h" |
| 18 | #include "css.h" | 19 | #include "css.h" |
| @@ -804,7 +805,8 @@ init_channel_subsystem (void) | |||
| 804 | goto out_pseudo; | 805 | goto out_pseudo; |
| 805 | css_init_done = 1; | 806 | css_init_done = 1; |
| 806 | 807 | ||
| 807 | ctl_set_bit(6, 28); | 808 | /* Enable default isc for I/O subchannels. */ |
| 809 | ctl_set_bit(6, 31 - IO_SCH_ISC); | ||
| 808 | 810 | ||
| 809 | for_each_subchannel(__init_channel_subsystem, NULL); | 811 | for_each_subchannel(__init_channel_subsystem, NULL); |
| 810 | return 0; | 812 | return 0; |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 215d27dba9e2..67e7a3123954 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <asm/cio.h> | 22 | #include <asm/cio.h> |
| 23 | #include <asm/param.h> /* HZ */ | 23 | #include <asm/param.h> /* HZ */ |
| 24 | #include <asm/cmb.h> | 24 | #include <asm/cmb.h> |
| 25 | #include <asm/isc.h> | ||
| 25 | 26 | ||
| 26 | #include "chp.h" | 27 | #include "chp.h" |
| 27 | #include "cio.h" | 28 | #include "cio.h" |
| @@ -1121,7 +1122,7 @@ static void io_subchannel_init_fields(struct subchannel *sch) | |||
| 1121 | else | 1122 | else |
| 1122 | sch->opm = chp_get_sch_opm(sch); | 1123 | sch->opm = chp_get_sch_opm(sch); |
| 1123 | sch->lpm = sch->schib.pmcw.pam & sch->opm; | 1124 | sch->lpm = sch->schib.pmcw.pam & sch->opm; |
| 1124 | sch->isc = cio_is_console(sch->schid) ? 1 : 3; | 1125 | sch->isc = cio_is_console(sch->schid) ? CONSOLE_ISC : IO_SCH_ISC; |
| 1125 | 1126 | ||
| 1126 | CIO_MSG_EVENT(6, "Detected device %04x on subchannel 0.%x.%04X" | 1127 | CIO_MSG_EVENT(6, "Detected device %04x on subchannel 0.%x.%04X" |
| 1127 | " - PIM = %02X, PAM = %02X, POM = %02X\n", | 1128 | " - PIM = %02X, PAM = %02X, POM = %02X\n", |
diff --git a/drivers/s390/cio/qdio.h b/drivers/s390/cio/qdio.h index c3df6b2c38b7..733934a166b1 100644 --- a/drivers/s390/cio/qdio.h +++ b/drivers/s390/cio/qdio.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _CIO_QDIO_H | 2 | #define _CIO_QDIO_H |
| 3 | 3 | ||
| 4 | #include <asm/page.h> | 4 | #include <asm/page.h> |
| 5 | #include <asm/isc.h> | ||
| 5 | 6 | ||
| 6 | #include "schid.h" | 7 | #include "schid.h" |
| 7 | 8 | ||
| @@ -26,7 +27,7 @@ | |||
| 26 | */ | 27 | */ |
| 27 | #define IQDIO_FILL_LEVEL_TO_POLL 4 | 28 | #define IQDIO_FILL_LEVEL_TO_POLL 4 |
| 28 | 29 | ||
| 29 | #define TIQDIO_THININT_ISC 3 | 30 | #define TIQDIO_THININT_ISC QDIO_AIRQ_ISC |
| 30 | #define TIQDIO_DELAY_TARGET 0 | 31 | #define TIQDIO_DELAY_TARGET 0 |
| 31 | #define QDIO_BUSY_BIT_PATIENCE 100 /* in microsecs */ | 32 | #define QDIO_BUSY_BIT_PATIENCE 100 /* in microsecs */ |
| 32 | #define QDIO_BUSY_BIT_GIVE_UP 10000000 /* 10 seconds */ | 33 | #define QDIO_BUSY_BIT_GIVE_UP 10000000 /* 10 seconds */ |
diff --git a/include/asm-s390/isc.h b/include/asm-s390/isc.h new file mode 100644 index 000000000000..533a1372234a --- /dev/null +++ b/include/asm-s390/isc.h | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | #ifndef _ASM_S390_ISC_H | ||
| 2 | #define _ASM_S390_ISC_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * I/O interruption subclasses used by drivers. | ||
| 6 | * Please add all used iscs here so that it is possible to distribute | ||
| 7 | * isc usage between drivers. | ||
| 8 | * Reminder: 0 is highest priority, 7 lowest. | ||
| 9 | */ | ||
| 10 | #define MAX_ISC 7 | ||
| 11 | |||
| 12 | /* Regular I/O interrupts. */ | ||
| 13 | #define IO_SCH_ISC 3 /* regular I/O subchannels */ | ||
| 14 | #define CONSOLE_ISC 1 /* console I/O subchannel */ | ||
| 15 | /* Adapter interrupts. */ | ||
| 16 | #define QDIO_AIRQ_ISC IO_SCH_ISC /* I/O subchannel in qdio mode */ | ||
| 17 | |||
| 18 | #endif /* _ASM_S390_ISC_H */ | ||
