diff options
| author | KATO Takenori <kato@FreeBSD.org> | 1999-04-21 12:14:37 +0000 |
|---|---|---|
| committer | KATO Takenori <kato@FreeBSD.org> | 1999-04-21 12:14:37 +0000 |
| commit | 8e6e1dfb884c560bd504760b75ad1ae8230422ed (patch) | |
| tree | a67fbd3cf3dc9896f3c8b73133323247c96bbaec | |
| parent | 63b6d959aec09e83aab25bf8a9f0f7b7068d545e (diff) | |
Notes
| -rw-r--r-- | sys/pc98/cbus/clock.c | 28 | ||||
| -rw-r--r-- | sys/pc98/cbus/pcrtc.c | 28 | ||||
| -rw-r--r-- | sys/pc98/pc98/clock.c | 28 |
3 files changed, 36 insertions, 48 deletions
diff --git a/sys/pc98/cbus/clock.c b/sys/pc98/cbus/clock.c index 067257d77e1e..51879cf7e7cf 100644 --- a/sys/pc98/cbus/clock.c +++ b/sys/pc98/cbus/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.65 1998/12/17 08:54:47 kato Exp $ + * $Id: clock.c,v 1.66 1999/01/28 11:36:22 kato Exp $ */ /* @@ -96,7 +96,7 @@ #endif #include <i386/isa/timerreg.h> -#include <sys/interrupt.h> +#include <i386/isa/intr_machdep.h> #ifdef SMP #define disable_intr() CLOCK_DISABLE_INTR() @@ -1286,6 +1286,7 @@ cpu_initclocks() { #ifdef APIC_IO int apic_8254_trial; + struct intrec *clkdesc; #endif /* APIC_IO */ #ifndef PC98 int diag; @@ -1323,16 +1324,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 */ @@ -1354,9 +1353,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); @@ -1381,17 +1379,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/pc98/cbus/pcrtc.c b/sys/pc98/cbus/pcrtc.c index 067257d77e1e..51879cf7e7cf 100644 --- a/sys/pc98/cbus/pcrtc.c +++ b/sys/pc98/cbus/pcrtc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.65 1998/12/17 08:54:47 kato Exp $ + * $Id: clock.c,v 1.66 1999/01/28 11:36:22 kato Exp $ */ /* @@ -96,7 +96,7 @@ #endif #include <i386/isa/timerreg.h> -#include <sys/interrupt.h> +#include <i386/isa/intr_machdep.h> #ifdef SMP #define disable_intr() CLOCK_DISABLE_INTR() @@ -1286,6 +1286,7 @@ cpu_initclocks() { #ifdef APIC_IO int apic_8254_trial; + struct intrec *clkdesc; #endif /* APIC_IO */ #ifndef PC98 int diag; @@ -1323,16 +1324,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 */ @@ -1354,9 +1353,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); @@ -1381,17 +1379,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/pc98/pc98/clock.c b/sys/pc98/pc98/clock.c index 067257d77e1e..51879cf7e7cf 100644 --- a/sys/pc98/pc98/clock.c +++ b/sys/pc98/pc98/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.65 1998/12/17 08:54:47 kato Exp $ + * $Id: clock.c,v 1.66 1999/01/28 11:36:22 kato Exp $ */ /* @@ -96,7 +96,7 @@ #endif #include <i386/isa/timerreg.h> -#include <sys/interrupt.h> +#include <i386/isa/intr_machdep.h> #ifdef SMP #define disable_intr() CLOCK_DISABLE_INTR() @@ -1286,6 +1286,7 @@ cpu_initclocks() { #ifdef APIC_IO int apic_8254_trial; + struct intrec *clkdesc; #endif /* APIC_IO */ #ifndef PC98 int diag; @@ -1323,16 +1324,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 */ @@ -1354,9 +1353,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); @@ -1381,17 +1379,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); } |
