summaryrefslogtreecommitdiffstats
path: root/sys/alpha/pci/tsunami.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2000-10-05 23:09:57 +0000
committerjhb <jhb@FreeBSD.org>2000-10-05 23:09:57 +0000
commit71938e9fcdc7dcdcee180aaf1693bdfbc2f62749 (patch)
treef79e43496c9e52b9fb7344402240cb467ffe42b4 /sys/alpha/pci/tsunami.c
parentd3d06a3e7cf8a76f1ff2e19d172e10e60b30aed5 (diff)
downloadFreeBSD-src-71938e9fcdc7dcdcee180aaf1693bdfbc2f62749.zip
FreeBSD-src-71938e9fcdc7dcdcee180aaf1693bdfbc2f62749.tar.gz
- Heavyweight interrupt threads on the alpha for device I/O interrupts.
- Make softinterrupts (SWI's) almost completely MI, and divorce them completely from the x86 hardware interrupt code. - The ihandlers array is now gone. Instead, there is a MI shandlers array that just contains SWI handlers. - Most of the former machine/ipl.h files have moved to a new sys/ipl.h. - Stub out all the spl*() functions on all architectures. Submitted by: dfr
Diffstat (limited to 'sys/alpha/pci/tsunami.c')
-rw-r--r--sys/alpha/pci/tsunami.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/sys/alpha/pci/tsunami.c b/sys/alpha/pci/tsunami.c
index 4f43e5c..f2ef20f 100644
--- a/sys/alpha/pci/tsunami.c
+++ b/sys/alpha/pci/tsunami.c
@@ -34,7 +34,9 @@
#include <sys/module.h>
#include <sys/bus.h>
#include <machine/bus.h>
+#include <sys/proc.h>
#include <sys/rman.h>
+#include <sys/interrupt.h>
#include <sys/malloc.h>
#include <pci/pcivar.h>
@@ -302,6 +304,20 @@ tsunami_attach(device_t dev)
return 0;
}
+static void
+tsunami_disable_intr_vec(int vector)
+{
+ int irq = (vector - 0x900) >> 4;
+ platform.pci_intr_disable(irq);
+}
+
+static void
+tsunami_enable_intr_vec(int vector)
+{
+ int irq = (vector - 0x900) >> 4;
+ platform.pci_intr_enable(irq);
+}
+
static int
tsunami_setup_intr(device_t dev, device_t child,
struct resource *irq, int flags,
@@ -313,9 +329,11 @@ tsunami_setup_intr(device_t dev, device_t child,
if (error)
return error;
- error = alpha_setup_intr(0x900 + (irq->r_start << 4),
- intr, arg, cookiep,
- &intrcnt[INTRCNT_EB164_IRQ + irq->r_start]);
+ error = alpha_setup_intr(device_get_nameunit(child ? child : dev),
+ 0x900 + (irq->r_start << 4), intr, arg,
+ ithread_priority(flags), cookiep,
+ &intrcnt[INTRCNT_EB164_IRQ + irq->r_start],
+ tsunami_disable_intr_vec, tsunami_enable_intr_vec);
if (error)
return error;
OpenPOWER on IntegriCloud