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/pci | |
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/pci')
-rw-r--r-- | sys/sparc64/pci/psycho.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sys/sparc64/pci/psycho.c b/sys/sparc64/pci/psycho.c index 8ffeb48..87c9df8 100644 --- a/sys/sparc64/pci/psycho.c +++ b/sys/sparc64/pci/psycho.c @@ -87,7 +87,8 @@ static int psycho_find_intrmap(struct psycho_softc *, u_int, bus_addr_t *, static driver_filter_t psycho_dmasync; static void psycho_intr_enable(void *); static void psycho_intr_disable(void *); -static void psycho_intr_eoi(void *); +static void psycho_intr_assign(void *); +static void psycho_intr_clear(void *); static bus_space_tag_t psycho_alloc_bus_tag(struct psycho_softc *, int); /* Interrupt handlers */ @@ -169,7 +170,8 @@ static SLIST_HEAD(, psycho_softc) psycho_softcs = static const struct intr_controller psycho_ic = { psycho_intr_enable, psycho_intr_disable, - psycho_intr_eoi + psycho_intr_assign, + psycho_intr_clear }; struct psycho_icarg { @@ -1099,7 +1101,17 @@ psycho_intr_disable(void *arg) } static void -psycho_intr_eoi(void *arg) +psycho_intr_assign(void *arg) +{ + struct intr_vector *iv = arg; + struct psycho_icarg *pica = iv->iv_icarg; + + PSYCHO_WRITE8(pica->pica_sc, pica->pica_map, INTMAP_TID( + PSYCHO_READ8(pica->pica_sc, pica->pica_map), iv->iv_mid)); +} + +static void +psycho_intr_clear(void *arg) { struct intr_vector *iv = arg; struct psycho_icarg *pica = iv->iv_icarg; |