diff options
author | marius <marius@FreeBSD.org> | 2008-04-23 20:04:38 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2008-04-23 20:04:38 +0000 |
commit | f7fcfdc595633492f520f12db8f7447003ab54b3 (patch) | |
tree | c31fd4bcad0b90fa7240c1cfbbfc8bc6975d7cd6 /sys/sparc64/sbus | |
parent | 14c9906df574afb418e2fbc4ebbf3743c8a541a8 (diff) | |
download | FreeBSD-src-f7fcfdc595633492f520f12db8f7447003ab54b3.zip FreeBSD-src-f7fcfdc595633492f520f12db8f7447003ab54b3.tar.gz |
o Rename ic_eoi to ic_clear to emphasize the functions it points
don't send and EOI which works like on amd64/i386 and blocks all
interrupts on the relevant interrupt controller.
o Replace the post_filter and post_inthread hooks registered when
creating the interrupt events with just ic_clear as on sparc64 we
don't need to do any disable->EOI->enable dance to unblock all but
the relevant interrupt while running the filter or handler; just
not clearing the interrupt already has the same effect.
o Merge from amd64/i386:
- Split the intr_table_lock into an sx lock used for most things,
and a spin lock to protect intrcnt_index.
- Add support for binding interrupts to CPUs, including for the
bus_bind_intr(9) interface, a assign_cpu hook and initially
shuffling interrupts arround in a round-robin fashion.
Reviewed by: jhb
MFC after: 1 month
Diffstat (limited to 'sys/sparc64/sbus')
-rw-r--r-- | sys/sparc64/sbus/sbus.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/sys/sparc64/sbus/sbus.c b/sys/sparc64/sbus/sbus.c index 44f51f5..3eac880 100644 --- a/sys/sparc64/sbus/sbus.c +++ b/sys/sparc64/sbus/sbus.c @@ -196,7 +196,8 @@ static struct sbus_devinfo * sbus_setup_dinfo(device_t, struct sbus_softc *, static void sbus_destroy_dinfo(struct sbus_devinfo *); static void sbus_intr_enable(void *); static void sbus_intr_disable(void *); -static void sbus_intr_eoi(void *); +static void sbus_intr_assign(void *); +static void sbus_intr_clear(void *); static int sbus_find_intrmap(struct sbus_softc *, u_int, bus_addr_t *, bus_addr_t *); static bus_space_tag_t sbus_alloc_bustag(struct sbus_softc *); @@ -253,7 +254,8 @@ DRIVER_MODULE(sbus, nexus, sbus_driver, sbus_devclass, 0, 0); static const struct intr_controller sbus_ic = { sbus_intr_enable, sbus_intr_disable, - sbus_intr_eoi + sbus_intr_assign, + sbus_intr_clear }; struct sbus_icarg { @@ -667,6 +669,7 @@ sbus_intr_enable(void *arg) SYSIO_WRITE8(sica->sica_sc, sica->sica_map, INTMAP_ENABLE(iv->iv_vec, iv->iv_mid)); } + static void sbus_intr_disable(void *arg) { @@ -677,7 +680,17 @@ sbus_intr_disable(void *arg) } static void -sbus_intr_eoi(void *arg) +sbus_intr_assign(void *arg) +{ + struct intr_vector *iv = arg; + struct sbus_icarg *sica = iv->iv_icarg; + + SYSIO_WRITE8(sica->sica_sc, sica->sica_map, INTMAP_TID( + SYSIO_READ8(sica->sica_sc, sica->sica_map), iv->iv_mid)); +} + +static void +sbus_intr_clear(void *arg) { struct intr_vector *iv = arg; struct sbus_icarg *sica = iv->iv_icarg; |