diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-11-10 17:36:07 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-11-10 17:41:15 +0100 |
commit | e45601b0780b2c81a6448cdafd952cb98112b9f4 (patch) | |
tree | 2f980cbf0cdad3b51a65dfd8d75761671c4b8093 /i386/i386at | |
parent | 7f51764417ba51667ad5bfa0c1756eba4c1a8ad4 (diff) | |
download | gnumach-e45601b0780b2c81a6448cdafd952cb98112b9f4.tar.gz gnumach-e45601b0780b2c81a6448cdafd952cb98112b9f4.tar.bz2 gnumach-e45601b0780b2c81a6448cdafd952cb98112b9f4.zip |
spl: Remove intpri array
And simplify prtnull vs intnull vs linux_bad_intr.
* i386/i386/ipl.h (intpri): Remove declaration
* i386/i386/pic.c (prtnull_count): Remove variable.
(prtnull): Remove function.
* i386/i386/pic.h (prtnull): Remove declaration.
* i386/i386at/autoconf.c (take_dev_irq, take_ctlr_irq): Use ivect instead of
intpri to determine irq availability. Do not set intpri.
* i386/i386at/pic_isa.c (ivect): Replace prtnull with intnull.
(intpri): Remove array.
* linux/dev/arch/i386/kernel/irq.c (linux_intr_pri): Remove variable.
(linux_bad_intr): Remove function.
(setup_x86_irq): Do not check intpri coherency. Do not set intpri. Set
default ivect to intnull instead of linux_bad_intr.
(probe_irq_on): Check ivect against intnull instead of linux_bad_intr.
Do not set intpri.
(probe_irq_off): Likewise.
(reserve_mach_irqs): Do not check against prtnull.
(old_clock_pri): Remove variable.
(init_IRQ): Do not set intpri. Do not set ivect to linux_bad_intr.
(restore_IRQ): Do not set ivect.
* i386/i386/pit.c (clkstart): Do not set intpri.
* i386/i386at/kd_mouse.c (kd_mouse_open, kd_mouse_close): Likewise.
* linux/dev/drivers/block/genhd.c (device_setup): Do not set linux_intr_pri.
* linux/dev/glue/block.c (init_partition, device_open): Likewise.
* linux/dev/glue/net.c (device_open): Likewise.
* linux/dev/glue/glue.h (linux_intr_pri, linux_bad_intr): Remove
declarations.
Diffstat (limited to 'i386/i386at')
-rw-r--r-- | i386/i386at/autoconf.c | 10 | ||||
-rw-r--r-- | i386/i386at/kd_mouse.c | 4 | ||||
-rw-r--r-- | i386/i386at/pic_isa.c | 9 |
3 files changed, 5 insertions, 18 deletions
diff --git a/i386/i386at/autoconf.c b/i386/i386at/autoconf.c index 6ed2270c..151e3fd2 100644 --- a/i386/i386at/autoconf.c +++ b/i386/i386at/autoconf.c @@ -126,12 +126,11 @@ void take_dev_irq( { int pic = (int)dev->sysdep1; - if (intpri[pic] == 0) { + if (ivect[pic] == intnull) { iunit[pic] = dev->unit; ivect[pic] = dev->intr; - intpri[pic] = (int)dev->sysdep; } else { - printf("The device below will clobber IRQ %d.\n", pic); + printf("The device below will clobber IRQ %d (%p).\n", pic, ivect[pic]); printf("You have two devices at the same IRQ.\n"); printf("This won't work. Reconfigure your hardware and try again.\n"); printf("%s%d: port = %lx, spl = %ld, pic = %d.\n", @@ -146,12 +145,11 @@ void take_ctlr_irq( const struct bus_ctlr *ctlr) { int pic = ctlr->sysdep1; - if (intpri[pic] == 0) { + if (ivect[pic] == intnull) { iunit[pic] = ctlr->unit; ivect[pic] = ctlr->intr; - intpri[pic] = (int)ctlr->sysdep; } else { - printf("The device below will clobber IRQ %d.\n", pic); + printf("The device below will clobber IRQ %d (%p).\n", pic, ivect[pic]); printf("You have two devices at the same IRQ. This won't work.\n"); printf("Reconfigure your hardware and try again.\n"); while (1); diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c index 05280055..2995587c 100644 --- a/i386/i386at/kd_mouse.c +++ b/i386/i386at/kd_mouse.c @@ -84,7 +84,6 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. static void (*oldvect)(); /* old interrupt vector */ static int oldunit; -static spl_t oldspl; extern struct bus_device *cominfo[]; kd_event_queue mouse_queue; /* queue of mouse events */ @@ -226,8 +225,6 @@ kd_mouse_open( oldvect = ivect[mouse_pic]; ivect[mouse_pic] = kdintr; - oldspl = intpri[mouse_pic]; - intpri[mouse_pic] = SPL6; splx(s); } @@ -289,7 +286,6 @@ kd_mouse_close( spl_t s = splhi(); ivect[mouse_pic] = oldvect; - intpri[mouse_pic] = oldspl; splx(s); } diff --git a/i386/i386at/pic_isa.c b/i386/i386at/pic_isa.c index 0b36534e..b0415c24 100644 --- a/i386/i386at/pic_isa.c +++ b/i386/i386at/pic_isa.c @@ -42,7 +42,7 @@ void (*ivect[NINTR])() = { /* 04 */ intnull, /* comintr, ... */ /* 05 */ intnull, /* comintr, wtintr, ... */ /* 06 */ intnull, /* fdintr, ... */ - /* 07 */ prtnull, /* qdintr, ... */ + /* 07 */ intnull, /* qdintr, ... */ /* 08 */ intnull, /* 09 */ intnull, /* ether */ @@ -54,10 +54,3 @@ void (*ivect[NINTR])() = { /* 14 */ intnull, /* hdintr, ... */ /* 15 */ intnull, /* ??? */ }; - -int intpri[NINTR] = { - /* 00 */ 0, SPL6, 0, 0, - /* 04 */ 0, 0, 0, 0, - /* 08 */ 0, 0, 0, 0, - /* 12 */ 0, SPL1, 0, 0, -}; |