diff options
author | jhb <jhb@FreeBSD.org> | 2000-10-05 23:09:57 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2000-10-05 23:09:57 +0000 |
commit | 71938e9fcdc7dcdcee180aaf1693bdfbc2f62749 (patch) | |
tree | f79e43496c9e52b9fb7344402240cb467ffe42b4 /sys/alpha/pci/t2.c | |
parent | d3d06a3e7cf8a76f1ff2e19d172e10e60b30aed5 (diff) | |
download | FreeBSD-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/t2.c')
-rw-r--r-- | sys/alpha/pci/t2.c | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/sys/alpha/pci/t2.c b/sys/alpha/pci/t2.c index db7deae..a15ff16 100644 --- a/sys/alpha/pci/t2.c +++ b/sys/alpha/pci/t2.c @@ -37,7 +37,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/t2reg.h> #include <alpha/pci/t2var.h> @@ -326,6 +328,36 @@ static const char irq_to_mask[40] = { 0, 1, 2, 3, 4, 5, 6, 7 /* PCI 0-7 XXX */ }; +static void +t2_disable_intr(int vector) +{ + int mask = (vector - 0x900) >> 4; + + t2_shadow_mask |= (1UL << mask); + + if (mask <= 7) + outb(SLAVE0_ICU, t2_shadow_mask); + else if (mask <= 15) + outb(SLAVE1_ICU, t2_shadow_mask >> 8); + else + outb(SLAVE2_ICU, t2_shadow_mask >> 16); +} + +static void +t2_enable_intr(int vector) +{ + int mask = (vector - 0x900) >> 4; + + t2_shadow_mask &= ~(1UL << mask); + + if (mask <= 7) + outb(SLAVE0_ICU, t2_shadow_mask); + else if (mask <= 15) + outb(SLAVE1_ICU, t2_shadow_mask >> 8); + else + outb(SLAVE2_ICU, t2_shadow_mask >> 16); +} + static int t2_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, @@ -340,9 +372,10 @@ t2_setup_intr(device_t dev, device_t child, if (error) return error; - error = alpha_setup_intr(vector, - intr, arg, cookiep, - &intrcnt[irq->r_start]); + error = alpha_setup_intr(device_get_nameunit(child ? child : dev), + vector, intr, arg, ithread_priority(flags), cookiep, + &intrcnt[irq->r_start], + t2_disable_intr, t2_enable_intr); if (error) return error; |