summaryrefslogtreecommitdiffstats
path: root/sys/alpha/pci/apecs.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/apecs.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/apecs.c')
-rw-r--r--sys/alpha/pci/apecs.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/sys/alpha/pci/apecs.c b/sys/alpha/pci/apecs.c
index e15aee1..ddd129a 100644
--- a/sys/alpha/pci/apecs.c
+++ b/sys/alpha/pci/apecs.c
@@ -62,7 +62,9 @@
#include <sys/malloc.h>
#include <sys/bus.h>
#include <machine/bus.h>
+#include <sys/proc.h>
#include <sys/rman.h>
+#include <sys/interrupt.h>
#include <alpha/pci/apecsreg.h>
#include <alpha/pci/apecsvar.h>
@@ -334,6 +336,20 @@ apecs_release_resource(device_t bus, device_t child, int type, int rid,
return pci_release_resource(bus, child, type, rid, r);
}
+static void
+apecs_disable_intr(int vector)
+{
+ int irq = (vector - 0x900) >> 4;
+ platform.pci_intr_disable(irq);
+}
+
+static void
+apecs_enable_intr(int vector)
+{
+ int irq = (vector - 0x900) >> 4;
+ platform.pci_intr_enable(irq);
+}
+
static int
apecs_setup_intr(device_t dev, device_t child,
struct resource *irq, int flags,
@@ -353,9 +369,11 @@ apecs_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_EB64PLUS_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_EB64PLUS_IRQ + irq->r_start],
+ apecs_disable_intr, apecs_enable_intr);
if (error)
return error;
OpenPOWER on IntegriCloud