diff options
author | Paolo Pisati <piso@FreeBSD.org> | 2007-02-23 12:19:07 +0000 |
---|---|---|
committer | Paolo Pisati <piso@FreeBSD.org> | 2007-02-23 12:19:07 +0000 |
commit | ef544f631226436ef590825881e7a28369df82f6 (patch) | |
tree | 10833d4edb6c0d0a5efcf7762d842a4c378404b0 /sys/pc98 | |
parent | 68cb8659050380e1245328796e2783f030c94974 (diff) | |
download | src-ef544f631226436ef590825881e7a28369df82f6.tar.gz src-ef544f631226436ef590825881e7a28369df82f6.zip |
o break newbus api: add a new argument of type driver_filter_t to
bus_setup_intr()
o add an int return code to all fast handlers
o retire INTR_FAST/IH_FAST
For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current
Reviewed by: many
Approved by: re@
Notes
Notes:
svn path=/head/; revision=166901
Diffstat (limited to 'sys/pc98')
-rw-r--r-- | sys/pc98/cbus/clock.c | 7 | ||||
-rw-r--r-- | sys/pc98/cbus/fdc.c | 2 | ||||
-rw-r--r-- | sys/pc98/cbus/pckbd.c | 2 | ||||
-rw-r--r-- | sys/pc98/cbus/pcrtc.c | 7 | ||||
-rw-r--r-- | sys/pc98/cbus/sio.c | 12 |
5 files changed, 17 insertions, 13 deletions
diff --git a/sys/pc98/cbus/clock.c b/sys/pc98/cbus/clock.c index 15705726cefa..0ebd31af3e82 100644 --- a/sys/pc98/cbus/clock.c +++ b/sys/pc98/cbus/clock.c @@ -139,7 +139,7 @@ static struct timecounter i8254_timecounter = { 0 /* quality */ }; -static void +static int clkintr(struct trapframe *frame) { @@ -156,6 +156,7 @@ clkintr(struct trapframe *frame) } KASSERT(!using_lapic_timer, ("clk interrupt enabled with lapic timer")); hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); + return (FILTER_HANDLED); } int @@ -700,8 +701,8 @@ cpu_initclocks() * timecounter to user a simpler algorithm. */ if (!using_lapic_timer) { - intr_add_handler("clk", 0, (driver_intr_t *)clkintr, NULL, - INTR_TYPE_CLK | INTR_FAST, NULL); + intr_add_handler("clk", 0, (driver_filter_t *)clkintr, NULL, + NULL, INTR_TYPE_CLK | INTR_FAST, NULL); i8254_intsrc = intr_lookup_source(0); if (i8254_intsrc != NULL) i8254_pending = diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c index b653a5219e25..980622e132f4 100644 --- a/sys/pc98/cbus/fdc.c +++ b/sys/pc98/cbus/fdc.c @@ -822,7 +822,7 @@ fdc_attach(device_t dev) fdc = device_get_softc(dev); fdc->fdc_dev = dev; error = bus_setup_intr(dev, fdc->res_irq, - INTR_TYPE_BIO | INTR_ENTROPY, fdc_intr, fdc, + INTR_TYPE_BIO | INTR_ENTROPY, NULL, fdc_intr, fdc, &fdc->fdc_intr); if (error) { device_printf(dev, "cannot setup interrupt\n"); diff --git a/sys/pc98/cbus/pckbd.c b/sys/pc98/cbus/pckbd.c index b22ced369da0..0b3d1d7bd04f 100644 --- a/sys/pc98/cbus/pckbd.c +++ b/sys/pc98/cbus/pckbd.c @@ -137,7 +137,7 @@ pckbdattach(device_t dev) res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); if (res == NULL) return ENXIO; - bus_setup_intr(dev, res, INTR_TYPE_TTY, pckbd_isa_intr, kbd, &ih); + bus_setup_intr(dev, res, INTR_TYPE_TTY, NULL, pckbd_isa_intr, kbd, &ih); return 0; } diff --git a/sys/pc98/cbus/pcrtc.c b/sys/pc98/cbus/pcrtc.c index 15705726cefa..0ebd31af3e82 100644 --- a/sys/pc98/cbus/pcrtc.c +++ b/sys/pc98/cbus/pcrtc.c @@ -139,7 +139,7 @@ static struct timecounter i8254_timecounter = { 0 /* quality */ }; -static void +static int clkintr(struct trapframe *frame) { @@ -156,6 +156,7 @@ clkintr(struct trapframe *frame) } KASSERT(!using_lapic_timer, ("clk interrupt enabled with lapic timer")); hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); + return (FILTER_HANDLED); } int @@ -700,8 +701,8 @@ cpu_initclocks() * timecounter to user a simpler algorithm. */ if (!using_lapic_timer) { - intr_add_handler("clk", 0, (driver_intr_t *)clkintr, NULL, - INTR_TYPE_CLK | INTR_FAST, NULL); + intr_add_handler("clk", 0, (driver_filter_t *)clkintr, NULL, + NULL, INTR_TYPE_CLK | INTR_FAST, NULL); i8254_intsrc = intr_lookup_source(0); if (i8254_intsrc != NULL) i8254_pending = diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index d2b78dac990d..fcab17059dea 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -350,7 +350,7 @@ static void comclose(struct tty *tp); static int comopen(struct tty *tp, struct cdev *dev); static void sioinput(struct com_s *com); static void siointr1(struct com_s *com); -static void siointr(void *arg); +static int siointr(void *arg); static int commodem(struct tty *tp, int sigon, int sigoff); static int comparam(struct tty *tp, struct termios *t); static void siopoll(void *); @@ -1739,12 +1739,13 @@ determined_type: ; com->irqres = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); if (com->irqres) { ret = bus_setup_intr(dev, com->irqres, - INTR_TYPE_TTY | INTR_FAST, - siointr, com, &com->cookie); + INTR_TYPE_TTY, + siointr, NULL, com, &com->cookie); if (ret) { ret = bus_setup_intr(dev, com->irqres, INTR_TYPE_TTY, - siointr, com, &com->cookie); + NULL, (driver_intr_t *)siointr, + com, &com->cookie); if (ret == 0) device_printf(dev, "unable to activate interrupt in fast mode - using normal mode\n"); } @@ -2155,7 +2156,7 @@ sioinput(com) #endif } -static void +static int siointr(arg) void *arg; { @@ -2221,6 +2222,7 @@ siointr(arg) } while (possibly_more_intrs); mtx_unlock_spin(&sio_lock); #endif /* COM_MULTIPORT */ + return (FILTER_HANDLED); } static struct timespec siots[8]; |