From ef544f631226436ef590825881e7a28369df82f6 Mon Sep 17 00:00:00 2001 From: Paolo Pisati Date: Fri, 23 Feb 2007 12:19:07 +0000 Subject: 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@ --- sys/isa/atrtc.c | 14 ++++++++------ sys/isa/isa_common.h | 3 ++- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'sys/isa') diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index 29ddd39bf3c8..153533826f82 100644 --- a/sys/isa/atrtc.c +++ b/sys/isa/atrtc.c @@ -142,7 +142,7 @@ static struct timecounter i8254_timecounter = { 0 /* quality */ }; -static void +static int clkintr(struct trapframe *frame) { @@ -164,6 +164,7 @@ clkintr(struct trapframe *frame) if (MCA_system) outb(0x61, inb(0x61) | 0x80); #endif + return (FILTER_HANDLED); } int @@ -218,7 +219,7 @@ 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) { @@ -231,6 +232,7 @@ rtcintr(struct trapframe *frame) if (pscnt == psdiv) statclock(TRAPF_USERMODE(frame)); } + return (FILTER_HANDLED); } #include "opt_ddb.h" @@ -758,8 +760,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 +794,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/isa/isa_common.h b/sys/isa/isa_common.h index 3f298077692c..4d61d463462d 100644 --- a/sys/isa/isa_common.h +++ b/sys/isa/isa_common.h @@ -70,7 +70,8 @@ extern int isa_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r); extern int isa_setup_intr(device_t bus, device_t child, struct resource *r, - int flags, void (*ihand)(void *), void *arg, void **cookiep); + int flags, driver_filter_t *filter, void (*ihand)(void *), void *arg, + void **cookiep); extern int isa_teardown_intr(device_t bus, device_t child, struct resource *r, void *cookie); -- cgit v1.2.3