summaryrefslogtreecommitdiffstats
path: root/sys/amd64/isa
diff options
context:
space:
mode:
authorpiso <piso@FreeBSD.org>2007-02-23 12:19:07 +0000
committerpiso <piso@FreeBSD.org>2007-02-23 12:19:07 +0000
commit6a2ffa86e5b748ba71e36d37462a936eb9101be7 (patch)
tree10833d4edb6c0d0a5efcf7762d842a4c378404b0 /sys/amd64/isa
parent7b48c9d78377cdb9fc6e8bcc5406e28819aef6e3 (diff)
downloadFreeBSD-src-6a2ffa86e5b748ba71e36d37462a936eb9101be7.zip
FreeBSD-src-6a2ffa86e5b748ba71e36d37462a936eb9101be7.tar.gz
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@
Diffstat (limited to 'sys/amd64/isa')
-rw-r--r--sys/amd64/isa/clock.c16
-rw-r--r--sys/amd64/isa/isa.c5
2 files changed, 13 insertions, 8 deletions
diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c
index e548b26..a6410ea 100644
--- a/sys/amd64/isa/clock.c
+++ b/sys/amd64/isa/clock.c
@@ -140,7 +140,7 @@ static struct timecounter i8254_timecounter = {
0 /* quality */
};
-static void
+static int
clkintr(struct trapframe *frame)
{
@@ -157,6 +157,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
@@ -211,11 +212,13 @@ release_timer2()
* Stat clock ticks can still be lost, causing minor loss of accuracy
* in the statistics, but the stat clock will no longer stop.
*/
-static void
+static int
rtcintr(struct trapframe *frame)
{
+ int flag = 0;
while (rtcin(RTC_INTR) & RTCIR_PERIOD) {
+ flag = 1;
if (profprocs != 0) {
if (--pscnt == 0)
pscnt = psdiv;
@@ -224,6 +227,7 @@ rtcintr(struct trapframe *frame)
if (pscnt == psdiv)
statclock(TRAPF_USERMODE(frame));
}
+ return(flag ? FILTER_HANDLED : FILTER_STRAY);
}
#include "opt_ddb.h"
@@ -758,8 +762,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, NULL);
i8254_intsrc = intr_lookup_source(0);
if (i8254_intsrc != NULL)
i8254_pending =
@@ -792,8 +796,8 @@ cpu_initclocks()
/* Enable periodic interrupts from the RTC. */
rtc_statusb |= RTCSB_PINTR;
- intr_add_handler("rtc", 8, (driver_intr_t *)rtcintr, NULL,
- INTR_TYPE_CLK | INTR_FAST, NULL);
+ intr_add_handler("rtc", 8, (driver_filter_t *)rtcintr, NULL, NULL,
+ INTR_TYPE_CLK, NULL);
writertc(RTC_STATUSB, rtc_statusb);
rtcin(RTC_INTR);
diff --git a/sys/amd64/isa/isa.c b/sys/amd64/isa/isa.c
index 9ac9c32..1f20226 100644
--- a/sys/amd64/isa/isa.c
+++ b/sys/amd64/isa/isa.c
@@ -147,10 +147,11 @@ isa_release_resource(device_t bus, device_t child, int type, int rid,
*/
int
isa_setup_intr(device_t bus, device_t child, struct resource *r, int flags,
- void (*ihand)(void *), void *arg, void **cookiep)
+ driver_filter_t *filter, void (*ihand)(void *), void *arg,
+ void **cookiep)
{
return (BUS_SETUP_INTR(device_get_parent(bus), child, r, flags,
- ihand, arg, cookiep));
+ filter, ihand, arg, cookiep));
}
int
OpenPOWER on IntegriCloud