diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2008-07-14 03:58:46 -0400 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-07-14 04:02:06 -0400 |
commit | c11561897ab57a3c11e0a284ba17795d580589ab (patch) | |
tree | 53224c4e8062a85b1794a3cabe81a86317538dfa /drivers/s390/cio/css.c | |
parent | c820de39bd083222f5be2563181c87493e436f7c (diff) |
[S390] cio: Cleanup crw interface.
Eliminate the need for the machine check handler to call into
the common I/O layer directly by introducing an interface to
register handlers for crws per rsc.
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>
Diffstat (limited to 'drivers/s390/cio/css.c')
-rw-r--r-- | drivers/s390/cio/css.c | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 020566571e07..cf9d27c6f444 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/list.h> | 14 | #include <linux/list.h> |
15 | #include <linux/reboot.h> | 15 | #include <linux/reboot.h> |
16 | 16 | ||
17 | #include "../s390mach.h" | ||
17 | #include "css.h" | 18 | #include "css.h" |
18 | #include "cio.h" | 19 | #include "cio.h" |
19 | #include "cio_debug.h" | 20 | #include "cio_debug.h" |
@@ -530,18 +531,29 @@ EXPORT_SYMBOL_GPL(css_schedule_reprobe); | |||
530 | /* | 531 | /* |
531 | * Called from the machine check handler for subchannel report words. | 532 | * Called from the machine check handler for subchannel report words. |
532 | */ | 533 | */ |
533 | void css_process_crw(int rsid1, int rsid2) | 534 | static void css_process_crw(struct crw *crw0, struct crw *crw1, int overflow) |
534 | { | 535 | { |
535 | struct subchannel_id mchk_schid; | 536 | struct subchannel_id mchk_schid; |
536 | 537 | ||
537 | CIO_CRW_EVENT(2, "source is subchannel %04X, subsystem id %x\n", | 538 | if (overflow) { |
538 | rsid1, rsid2); | 539 | css_schedule_eval_all(); |
540 | return; | ||
541 | } | ||
542 | CIO_CRW_EVENT(2, "CRW0 reports slct=%d, oflw=%d, " | ||
543 | "chn=%d, rsc=%X, anc=%d, erc=%X, rsid=%X\n", | ||
544 | crw0->slct, crw0->oflw, crw0->chn, crw0->rsc, crw0->anc, | ||
545 | crw0->erc, crw0->rsid); | ||
546 | if (crw1) | ||
547 | CIO_CRW_EVENT(2, "CRW1 reports slct=%d, oflw=%d, " | ||
548 | "chn=%d, rsc=%X, anc=%d, erc=%X, rsid=%X\n", | ||
549 | crw1->slct, crw1->oflw, crw1->chn, crw1->rsc, | ||
550 | crw1->anc, crw1->erc, crw1->rsid); | ||
539 | init_subchannel_id(&mchk_schid); | 551 | init_subchannel_id(&mchk_schid); |
540 | mchk_schid.sch_no = rsid1; | 552 | mchk_schid.sch_no = crw0->rsid; |
541 | if (rsid2 != 0) | 553 | if (crw1) |
542 | mchk_schid.ssid = (rsid2 >> 8) & 3; | 554 | mchk_schid.ssid = (crw1->rsid >> 8) & 3; |
543 | 555 | ||
544 | /* | 556 | /* |
545 | * Since we are always presented with IPI in the CRW, we have to | 557 | * Since we are always presented with IPI in the CRW, we have to |
546 | * use stsch() to find out if the subchannel in question has come | 558 | * use stsch() to find out if the subchannel in question has come |
547 | * or gone. | 559 | * or gone. |
@@ -740,6 +752,10 @@ init_channel_subsystem (void) | |||
740 | if (ret) | 752 | if (ret) |
741 | goto out; | 753 | goto out; |
742 | 754 | ||
755 | ret = s390_register_crw_handler(CRW_RSC_SCH, css_process_crw); | ||
756 | if (ret) | ||
757 | goto out; | ||
758 | |||
743 | if ((ret = bus_register(&css_bus_type))) | 759 | if ((ret = bus_register(&css_bus_type))) |
744 | goto out; | 760 | goto out; |
745 | 761 | ||
@@ -817,6 +833,7 @@ out_unregister: | |||
817 | out_bus: | 833 | out_bus: |
818 | bus_unregister(&css_bus_type); | 834 | bus_unregister(&css_bus_type); |
819 | out: | 835 | out: |
836 | s390_unregister_crw_handler(CRW_RSC_CSS); | ||
820 | chsc_free_sei_area(); | 837 | chsc_free_sei_area(); |
821 | kfree(slow_subchannel_set); | 838 | kfree(slow_subchannel_set); |
822 | printk(KERN_WARNING"cio: failed to initialize css driver (%d)!\n", | 839 | printk(KERN_WARNING"cio: failed to initialize css driver (%d)!\n", |