aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64/fhc/fhc.c
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2008-04-23 20:04:38 +0000
committerMarius Strobl <marius@FreeBSD.org>2008-04-23 20:04:38 +0000
commit526bd7042532c06b94a894c99ce78ff535275ed4 (patch)
treec31fd4bcad0b90fa7240c1cfbbfc8bc6975d7cd6 /sys/sparc64/fhc/fhc.c
parente5bf0d71c9b7fece2bf21c9b58b11bb2a2affa1d (diff)
downloadsrc-526bd7042532c06b94a894c99ce78ff535275ed4.tar.gz
src-526bd7042532c06b94a894c99ce78ff535275ed4.zip
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
Notes
Notes: svn path=/head/; revision=178443
Diffstat (limited to 'sys/sparc64/fhc/fhc.c')
-rw-r--r--sys/sparc64/fhc/fhc.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/sys/sparc64/fhc/fhc.c b/sys/sparc64/fhc/fhc.c
index 8fcd25d120c6..f121b6ea97c4 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;