diff options
author | peter <peter@FreeBSD.org> | 1999-04-21 07:26:30 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-04-21 07:26:30 +0000 |
commit | fa628c268c2d531552037f05699c06959d9618e6 (patch) | |
tree | 139882de7181a80226508d0a7c0f4695f2639ae0 /sys/isa | |
parent | 47b96f90c086096cb12e76442461d4da895e207b (diff) | |
download | FreeBSD-src-fa628c268c2d531552037f05699c06959d9618e6.zip FreeBSD-src-fa628c268c2d531552037f05699c06959d9618e6.tar.gz |
Stage 1 of a cleanup of the i386 interrupt registration mechanism.
Interrupts under the new scheme are managed by the i386 nexus with the
awareness of the resource manager. There is further room for optimizing
the interfaces still. All the users of register_intr()/intr_create()
should be gone, with the exception of pcic and i386/isa/clock.c.
Diffstat (limited to 'sys/isa')
-rw-r--r-- | sys/isa/atrtc.c | 28 | ||||
-rw-r--r-- | sys/isa/isavar.h | 6 |
2 files changed, 15 insertions, 19 deletions
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index d9bca71..3daaf94 100644 --- a/sys/isa/atrtc.c +++ b/sys/isa/atrtc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.128 1998/10/23 10:46:20 phk Exp $ + * $Id: clock.c,v 1.129 1998/12/14 13:30:29 mckay Exp $ */ /* @@ -86,7 +86,7 @@ #include <i386/isa/rtc.h> #include <i386/isa/timerreg.h> -#include <sys/interrupt.h> +#include <i386/isa/intr_machdep.h> #ifdef SMP #define disable_intr() CLOCK_DISABLE_INTR() @@ -948,6 +948,7 @@ cpu_initclocks() int diag; #ifdef APIC_IO int apic_8254_trial; + intrec *clkdesc; #endif /* APIC_IO */ if (statclock_disable) { @@ -982,16 +983,14 @@ cpu_initclocks() panic("APIC_IO: Cannot route 8254 interrupt to CPU"); } - register_intr(/* irq */ apic_8254_intr, /* XXX id */ 0, /* flags */ 0, - /* XXX */ (inthand2_t *)clkintr, &clk_imask, - /* unit */ 0); + clkdesc = inthand_add("clk", apic_8254_intr, (inthand2_t *)clkintr, + NULL, &clk_imask, INTR_EXCL); INTREN(1 << apic_8254_intr); #else /* APIC_IO */ - register_intr(/* irq */ 0, /* XXX id */ 0, /* flags */ 0, - /* XXX */ (inthand2_t *)clkintr, &clk_imask, - /* unit */ 0); + inthand_add("clk", 0, (inthand2_t *)clkintr, NULL, &clk_imask, + INTR_EXCL); INTREN(IRQ0); #endif /* APIC_IO */ @@ -1012,9 +1011,8 @@ cpu_initclocks() panic("APIC RTC != 8"); #endif /* APIC_IO */ - register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0, - /* XXX */ (inthand2_t *)rtcintr, &stat_imask, - /* unit */ 0); + inthand_add("rtc", 8, (inthand2_t *)rtcintr, NULL, &stat_imask, + INTR_EXCL); #ifdef APIC_IO INTREN(APIC_IRQ8); @@ -1038,17 +1036,15 @@ cpu_initclocks() * Workaround: Limited variant of mixed mode. */ INTRDIS(1 << apic_8254_intr); - unregister_intr(apic_8254_intr, - /* XXX */ (inthand2_t *) clkintr); + inthand_remove(clkdesc); printf("APIC_IO: Broken MP table detected: " "8254 is not connected to IO APIC int pin %d\n", apic_8254_intr); apic_8254_intr = 0; setup_8254_mixed_mode(); - register_intr(/* irq */ apic_8254_intr, /* XXX id */ 0, /* flags */ 0, - /* XXX */ (inthand2_t *)clkintr, &clk_imask, - /* unit */ 0); + inthand_add("clk", apic_8254_intr,(inthand2_t *)clkintr, + NULL, &clk_imask, INTR_EXCL); INTREN(1 << apic_8254_intr); } diff --git a/sys/isa/isavar.h b/sys/isa/isavar.h index 21447b6..f1eb25c 100644 --- a/sys/isa/isavar.h +++ b/sys/isa/isavar.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: isavar.h,v 1.2 1998/11/15 18:25:17 dfr Exp $ + * $Id: isavar.h,v 1.3 1999/04/16 21:22:34 peter Exp $ */ #define ISA_NPORT_IVARS 2 @@ -53,8 +53,8 @@ enum isa_device_ivars { ISA_IVAR_DRQ_1 }; -extern int isa_irq_pending(void); -extern int isa_irq_mask(void); +extern intrmask_t isa_irq_pending(void); +extern intrmask_t isa_irq_mask(void); /* * Simplified accessors for isa devices |