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/fhc | |
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/fhc')
-rw-r--r-- | sys/sparc64/fhc/fhc.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/sys/sparc64/fhc/fhc.c b/sys/sparc64/fhc/fhc.c index 8fcd25d..f121b6e 100644 --- a/sys/sparc64/fhc/fhc.c +++ b/sys/sparc64/fhc/fhc.c @@ -74,7 +74,8 @@ static ofw_bus_get_devinfo_t fhc_get_devinfo; static void fhc_intr_enable(void *); static void fhc_intr_disable(void *); -static void fhc_intr_eoi(void *); +static void fhc_intr_assign(void *); +static void fhc_intr_clear(void *); static void fhc_led_func(void *, int); static int fhc_print_res(struct fhc_devinfo *); @@ -123,7 +124,8 @@ DRIVER_MODULE(fhc, nexus, fhc_driver, fhc_devclass, 0, 0); static const struct intr_controller fhc_ic = { fhc_intr_enable, fhc_intr_disable, - fhc_intr_eoi + fhc_intr_assign, + fhc_intr_clear }; struct fhc_icarg { @@ -366,7 +368,18 @@ fhc_intr_disable(void *arg) } static void -fhc_intr_eoi(void *arg) +fhc_intr_assign(void *arg) +{ + struct intr_vector *iv = arg; + struct fhc_icarg *fica = iv->iv_icarg; + + bus_write_4(fica->fica_memres, FHC_IMAP, INTMAP_TID( + bus_read_4(fica->fica_memres, FHC_IMAP), iv->iv_mid)); + (void)bus_read_4(fica->fica_memres, FHC_IMAP); +} + +static void +fhc_intr_clear(void *arg) { struct intr_vector *iv = arg; struct fhc_icarg *fica = iv->iv_icarg; |