PERFORCE change 99941 for review
Paolo Pisati
piso at FreeBSD.org
Sat Jun 24 14:57:37 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=99941
Change 99941 by piso at piso_newluxor on 2006/06/24 14:56:52
Finished to reconvert all the drivers marked as FIX_INTR_FILTER
as interrupt filters.
Affected files ...
.. //depot/projects/soc2006/intr_filter/amd64/isa/clock.c#3 edit
.. //depot/projects/soc2006/intr_filter/arm/at91/at91_pio.c#3 edit
.. //depot/projects/soc2006/intr_filter/arm/at91/at91_rtc.c#3 edit
.. //depot/projects/soc2006/intr_filter/arm/at91/at91_st.c#3 edit
.. //depot/projects/soc2006/intr_filter/arm/sa11x0/sa11x0_ost.c#3 edit
.. //depot/projects/soc2006/intr_filter/arm/xscale/i80321/i80321_timer.c#3 edit
.. //depot/projects/soc2006/intr_filter/dev/adlink/adlink.c#3 edit
.. //depot/projects/soc2006/intr_filter/dev/cy/cy_isa.c#3 edit
.. //depot/projects/soc2006/intr_filter/dev/cy/cy_pci.c#4 edit
.. //depot/projects/soc2006/intr_filter/dev/em/if_em.c#4 edit
.. //depot/projects/soc2006/intr_filter/dev/zs/zs_macio.c#3 edit
.. //depot/projects/soc2006/intr_filter/pc98/cbus/clock.c#3 edit
.. //depot/projects/soc2006/intr_filter/pc98/cbus/sio.c#3 edit
.. //depot/projects/soc2006/intr_filter/powerpc/powermac/pswitch.c#3 edit
.. //depot/projects/soc2006/intr_filter/sparc64/pci/psycho.c#3 edit
.. //depot/projects/soc2006/intr_filter/sparc64/sbus/sbus.c#3 edit
Differences ...
==== //depot/projects/soc2006/intr_filter/amd64/isa/clock.c#3 (text+ko) ====
@@ -759,9 +759,8 @@
* that it can drive hardclock(). Otherwise, change the 8254
* timecounter to user a simpler algorithm.
*/
- // XXX - FIX_INTR_FILTER
if (!using_lapic_timer) {
- intr_add_handler("clk", 0, (driver_intr_t *)clkintr, 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)
@@ -795,8 +794,7 @@
/* Enable periodic interrupts from the RTC. */
rtc_statusb |= RTCSB_PINTR;
- // XXX - FIX_INTR_FILTER
- intr_add_handler("rtc", 8, (driver_intr_t *)rtcintr, NULL,
+ intr_add_handler("rtc", 8, (driver_filter_t *)rtcintr, NULL, NULL,
INTR_TYPE_CLK | INTR_FAST, NULL);
writertc(RTC_STATUSB, rtc_statusb);
==== //depot/projects/soc2006/intr_filter/arm/at91/at91_pio.c#3 (text) ====
@@ -124,9 +124,8 @@
* Activate the interrupt, but disable all interrupts in the hardware
*/
WR4(sc, PIO_IDR, 0xffffffff);
- // XXX - FIX_INTR_FILTER
err = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_MISC | INTR_FAST,
- (driver_intr_t *)at91_pio_intr, sc, &sc->intrhand);
+ (driver_filter_t *)at91_pio_intr, NULL, sc, &sc->intrhand);
if (err) {
AT91_PIO_LOCK_DESTROY(sc);
goto out;
==== //depot/projects/soc2006/intr_filter/arm/at91/at91_rtc.c#3 (text) ====
@@ -110,9 +110,8 @@
* Activate the interrupt, but disable all interrupts in the hardware
*/
WR4(sc, RTC_IDR, 0xffffffff);
- // XXX - FIX_INTR_FILTER
err = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_MISC | INTR_FAST,
- (driver_intr_t *)at91_rtc_intr, sc, &sc->intrhand);
+ (driver_filter_t *)at91_rtc_intr, NULL, sc, &sc->intrhand);
if (err) {
AT91_RTC_LOCK_DESTROY(sc);
goto out;
==== //depot/projects/soc2006/intr_filter/arm/at91/at91_st.c#3 (text) ====
@@ -175,12 +175,11 @@
/* The system timer shares the system irq (1) */
irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 1, 1, 1,
RF_ACTIVE | RF_SHAREABLE);
- // XXX - FIX_INTR_FILTER
if (!irq)
panic("Unable to allocate irq for the system timer");
else
bus_setup_intr(dev, irq, INTR_TYPE_CLK | INTR_FAST,
- (driver_intr_t *)clock_intr, NULL, &ih);
+ (driver_filter_t *)clock_intr, NULL, NULL, &ih);
WR4(ST_PIMR, rel_value);
==== //depot/projects/soc2006/intr_filter/arm/sa11x0/sa11x0_ost.c#3 (text+ko) ====
@@ -273,13 +273,11 @@
rid = 1;
irq2 = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1,
RF_ACTIVE);
- // XXX - FIX_INTR_FILTER
bus_setup_intr(dev, irq1, INTR_TYPE_CLK | INTR_FAST,
- (driver_intr_t *)clockintr, NULL, &ih1);
+ (driver_filter_t *)clockintr, NULL, NULL, &ih1);
#if 0
- // XXX - FIX_INTR_FILTER
bus_setup_intr(dev, irq2, INTR_TYPE_CLK | INTR_FAST,
- (driver_intr_t *)statintr, NULL, &ih2);
+ (driver_filter_t *)statintr, NULL, NULL, &ih2);
#endif
bus_space_write_4(saost_sc->sc_iot, saost_sc->sc_ioh, SAOST_SR, 0xf);
bus_space_write_4(saost_sc->sc_iot, saost_sc->sc_ioh, SAOST_IR, 3);
==== //depot/projects/soc2006/intr_filter/arm/xscale/i80321/i80321_timer.c#3 (text+ko) ====
@@ -334,12 +334,11 @@
irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, ICU_INT_TMR0,
ICU_INT_TMR0, 1, RF_ACTIVE);
- // XXX - FIX_INTR_FILTER
if (!irq)
panic("Unable to setup the clock irq handler.\n");
else
bus_setup_intr(dev, irq, INTR_TYPE_CLK | INTR_FAST,
- (driver_intr_t *)clockhandler, NULL, &ihl);
+ (driver_filter_t *)clockhandler, NULL, NULL, &ihl);
tmr0_write(0); /* stop timer */
tisr_write(TISR_TMR0); /* clear interrupt */
==== //depot/projects/soc2006/intr_filter/dev/adlink/adlink.c#3 (text+ko) ====
@@ -373,10 +373,9 @@
if (error)
return (error);
- // XXX - FIX_INTR_FILTER
i = bus_setup_intr(self, sc->res[2],
INTR_MPSAFE | INTR_TYPE_MISC | INTR_FAST,
- (driver_intr_t *)adlink_intr, sc, &sc->intrhand);
+ (driver_filter_t *)adlink_intr, NULL, sc, &sc->intrhand);
if (i) {
printf("adlink: Couldn't get FAST intr\n");
i = bus_setup_intr(self, sc->res[2],
==== //depot/projects/soc2006/intr_filter/dev/cy/cy_isa.c#3 (text+ko) ====
@@ -132,9 +132,8 @@
device_printf(dev, "interrupt resource allocation failed\n");
goto fail;
}
- // XXX - FIX_INTR_FILTER
if (bus_setup_intr(dev, irq_res, INTR_TYPE_TTY | INTR_FAST,
- (driver_intr_t *)cyintr, vsc, &irq_cookie) != 0) {
+ (driver_filter_t *)cyintr, NULL, vsc, &irq_cookie) != 0) {
device_printf(dev, "interrupt setup failed\n");
goto fail;
}
==== //depot/projects/soc2006/intr_filter/dev/cy/cy_pci.c#4 (text+ko) ====
@@ -145,15 +145,14 @@
goto fail;
}
#ifdef CY_PCI_FASTINTR
- // XXX - FIX_INTR_FILTER
irq_setup = bus_setup_intr(dev, irq_res, INTR_TYPE_TTY | INTR_FAST,
- (driver_intr_t *)cyintr, vsc, &irq_cookie);
+ (driver_filter_t *)cyintr, NULL, vsc, &irq_cookie);
#else
irq_setup = ENXIO;
#endif
if (irq_setup != 0)
irq_setup = bus_setup_intr(dev, irq_res, INTR_TYPE_TTY,
- (driver_intr_t *)cyintr, vsc, &irq_cookie);
+ NULL, (driver_intr_t *)cyintr, vsc, &irq_cookie);
if (irq_setup != 0) {
device_printf(dev, "interrupt setup failed\n");
goto fail;
==== //depot/projects/soc2006/intr_filter/dev/em/if_em.c#4 (text+ko) ====
@@ -1992,9 +1992,8 @@
taskqueue_thread_enqueue, &sc->tq);
taskqueue_start_threads(&sc->tq, 1, PI_NET, "%s taskq",
device_get_nameunit(sc->dev));
- // XXX - FIX_INTR_FILTER
if ((error = bus_setup_intr(dev, sc->res_interrupt,
- INTR_TYPE_NET | INTR_FAST, em_intr_fast, NULL, sc,
+ INTR_TYPE_NET | INTR_FAST, em_intr_fast, NULL, NULL, sc,
&sc->int_handler_tag)) != 0) {
device_printf(dev, "Failed to register fast interrupt "
"handler: %d\n", error);
==== //depot/projects/soc2006/intr_filter/dev/zs/zs_macio.c#3 (text+ko) ====
@@ -158,9 +158,8 @@
device_printf(dev, "could not allocate interrupt 1\n");
goto error;
}
- // XXX - FIX_INTR_FILTER
if (bus_setup_intr(dev, sc->sc_irqres1, INTR_TYPE_TTY | INTR_FAST,
- (driver_intr_t *)zs_intr, sc, &sc->sc_ih1) != 0) {
+ (driver_filter_t *)zs_intr, NULL, sc, &sc->sc_ih1) != 0) {
device_printf(dev, "could not setup interrupt 1\n");
goto error;
}
@@ -171,9 +170,8 @@
device_printf(dev, "could not allocate interrupt 2\n");
goto error;
}
- // XXX - FIX_INTR_FILTER
if (bus_setup_intr(dev, sc->sc_irqres2, INTR_TYPE_TTY | INTR_FAST,
- (driver_intr_t *)zs_intr, sc, &sc->sc_ih2) != 0) {
+ (driver_filter_t *)zs_intr, NULL, sc, &sc->sc_ih2) != 0) {
device_printf(dev, "could not setup interrupt 2\n");
goto error;
}
==== //depot/projects/soc2006/intr_filter/pc98/cbus/clock.c#3 (text+ko) ====
@@ -775,8 +775,7 @@
* timecounter to user a simpler algorithm.
*/
if (!using_lapic_timer) {
- // XXX - FIX_INTR_FILTER
- intr_add_handler("clk", 0, (driver_intr_t *)clkintr, 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)
==== //depot/projects/soc2006/intr_filter/pc98/cbus/sio.c#3 (text+ko) ====
@@ -1738,10 +1738,9 @@
rid = 0;
com->irqres = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE);
if (com->irqres) {
- // XXX - FIX_INTR_FILTER
ret = bus_setup_intr(dev, com->irqres,
INTR_TYPE_TTY | INTR_FAST,
- (driver_intr_t *)siointr, com,
+ (driver_filter_t *)siointr, NULL, com,
&com->cookie);
if (ret) {
ret = bus_setup_intr(dev,
==== //depot/projects/soc2006/intr_filter/powerpc/powermac/pswitch.c#3 (text+ko) ====
@@ -121,9 +121,8 @@
return (ENXIO);
}
- // XXX - FIX_INTR_FILTER
if (bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_MISC | INTR_FAST,
- (driver_intr_t *)pswitch_intr, dev, &sc->sc_ih) != 0) {
+ (driver_filter_t *)pswitch_intr, NULL, dev, &sc->sc_ih) != 0) {
device_printf(dev, "could not setup interrupt\n");
bus_release_resource(dev, SYS_RES_IRQ, sc->sc_irqrid,
sc->sc_irq);
==== //depot/projects/soc2006/intr_filter/sparc64/pci/psycho.c#3 (text+ko) ====
@@ -80,7 +80,7 @@
const char *);
static const struct psycho_desc *psycho_get_desc(phandle_t, const char *);
static void psycho_set_intr(struct psycho_softc *, int, device_t, bus_addr_t,
- int, driver_intr_t);
+ int, void *);
static int psycho_find_intrmap(struct psycho_softc *, int, bus_addr_t *,
bus_addr_t *, u_long *);
static void psycho_intr_stub(void *);
@@ -453,9 +453,8 @@
* half this is. Hummingbird/Sabre don't have a PCI bus B error
* interrupt but they are also only used for PCI bus A.
*/
- // XXX - FIX_INTR_FILTER
psycho_set_intr(sc, 0, dev, sc->sc_half == 0 ? PSR_PCIAERR_INT_MAP :
- PSR_PCIBERR_INT_MAP, INTR_FAST, (driver_intr_t *)psycho_pci_bus);
+ PSR_PCIBERR_INT_MAP, INTR_FAST, psycho_pci_bus);
/*
* If we're a Hummingbird/Sabre or the first of a pair of Psycho's to
@@ -471,14 +470,11 @@
* XXX Not all controllers have these, but installing them
* is better than trying to sort through this mess.
*/
- // XXX - FIX_INTR_FILTER
psycho_set_intr(sc, 1, dev, PSR_UE_INT_MAP, INTR_FAST,
- (driver_intr_t *)psycho_ue);
+ psycho_ue);
psycho_set_intr(sc, 2, dev, PSR_CE_INT_MAP, 0, psycho_ce);
- // XXX - FIX_INTR_FILTER
psycho_set_intr(sc, 3, dev, PSR_POWER_INT_MAP,
- PSYCHO_PWRFAIL_INT_FLAGS,
- (driver_intr_t *)psycho_powerfail);
+ PSYCHO_PWRFAIL_INT_FLAGS, psycho_powerfail);
/* Psycho-specific initialization */
if (sc->sc_mode == PSYCHO_MODE_PSYCHO) {
/*
@@ -490,9 +486,8 @@
* The spare hardware interrupt is used for the
* over-temperature interrupt.
*/
- // XXX - FIX_INTR_FILTER
psycho_set_intr(sc, 4, dev, PSR_SPARE_INT_MAP,
- INTR_FAST, (driver_intr_t *)psycho_overtemp);
+ INTR_FAST, psycho_overtemp);
#ifdef PSYCHO_MAP_WAKEUP
/*
* psycho_wakeup() doesn't do anything useful right
@@ -618,7 +613,7 @@
static void
psycho_set_intr(struct psycho_softc *sc, int index, device_t dev,
- bus_addr_t map, int iflags, driver_intr_t handler)
+ bus_addr_t map, int iflags, void *handler)
{
int rid, vec;
uint64_t mr;
@@ -630,8 +625,12 @@
vec, vec, 1, RF_ACTIVE);
if (sc->sc_irq_res[index] == NULL)
panic("%s: failed to get interrupt", __func__);
- bus_setup_intr(dev, sc->sc_irq_res[index], INTR_TYPE_MISC | iflags,
- handler, sc, &sc->sc_ihand[index]);
+ if (iflags & INTR_FAST)
+ bus_setup_intr(dev, sc->sc_irq_res[index], INTR_TYPE_MISC | iflags,
+ handler, NULL, sc, &sc->sc_ihand[index]);
+ else
+ bus_setup_intr(dev, sc->sc_irq_res[index], INTR_TYPE_MISC | iflags,
+ NULL, handler, sc, &sc->sc_ihand[index]);
PSYCHO_WRITE8(sc, map, INTMAP_ENABLE(mr, PCPU_GET(mid)));
}
==== //depot/projects/soc2006/intr_filter/sparc64/sbus/sbus.c#3 (text+ko) ====
@@ -433,9 +433,8 @@
if ((sc->sc_ot_ires = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, vec,
vec, 1, RF_ACTIVE)) == NULL)
panic("%s: failed to get temperature interrupt", __func__);
- // XXX - FIX_INTR_FILTER
bus_setup_intr(dev, sc->sc_ot_ires, INTR_TYPE_MISC | INTR_FAST,
- (driver_intr_t *)sbus_overtemp, sc, &sc->sc_ot_ihand);
+ (driver_filter_t *)sbus_overtemp, NULL, sc, &sc->sc_ot_ihand);
SYSIO_WRITE8(sc, SBR_THERM_INT_MAP, INTMAP_ENABLE(mr, PCPU_GET(mid)));
rid = 0;
mr = SYSIO_READ8(sc, SBR_POWER_INT_MAP);
@@ -443,9 +442,8 @@
if ((sc->sc_pf_ires = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, vec,
vec, 1, RF_ACTIVE)) == NULL)
panic("%s: failed to get power fail interrupt", __func__);
- // XXX - FIX_INTR_FILTER
bus_setup_intr(dev, sc->sc_pf_ires, INTR_TYPE_MISC | INTR_FAST,
- (driver_intr_t *)sbus_pwrfail, sc, &sc->sc_pf_ihand);
+ (driver_filter_t *)sbus_pwrfail, NULL, sc, &sc->sc_pf_ihand);
SYSIO_WRITE8(sc, SBR_POWER_INT_MAP, INTMAP_ENABLE(mr, PCPU_GET(mid)));
/* Initialize the counter-timer. */
More information about the p4-projects
mailing list