diff options
author | jhb <jhb@FreeBSD.org> | 2000-10-25 05:19:40 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2000-10-25 05:19:40 +0000 |
commit | ff18363a3e5e60f38c8f7a52c7e7f4ea1c8b797f (patch) | |
tree | d0f426694e386a2b666529e1e1ad06938c3d7e83 /sys/ia64 | |
parent | 08451a100d3bc5d4373e28f7acd976df25f3f785 (diff) | |
download | FreeBSD-src-ff18363a3e5e60f38c8f7a52c7e7f4ea1c8b797f.zip FreeBSD-src-ff18363a3e5e60f38c8f7a52c7e7f4ea1c8b797f.tar.gz |
- Overhaul the software interrupt code to use interrupt threads for each
type of software interrupt. Roughly, what used to be a bit in spending
now maps to a swi thread. Each thread can have multiple handlers, just
like a hardware interrupt thread.
- Instead of using a bitmask of pending interrupts, we schedule the specific
software interrupt thread to run, so spending, NSWI, and the shandlers
array are no longer needed. We can now have an arbitrary number of
software interrupt threads. When you register a software interrupt
thread via sinthand_add(), you get back a struct intrhand that you pass
to sched_swi() when you wish to schedule your swi thread to run.
- Convert the name of 'struct intrec' to 'struct intrhand' as it is a bit
more intuitive. Also, prefix all the members of struct intrhand with
'ih_'.
- Make swi_net() a MI function since there is now no point in it being
MD.
Submitted by: cp
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/ia64/busdma_machdep.c | 2 | ||||
-rw-r--r-- | sys/ia64/ia64/ipl_funcs.c | 55 | ||||
-rw-r--r-- | sys/ia64/ia64/mem.c | 6 | ||||
-rw-r--r-- | sys/ia64/ia64/vm_machdep.c | 2 | ||||
-rw-r--r-- | sys/ia64/include/ipl.h | 8 | ||||
-rw-r--r-- | sys/ia64/include/md_var.h | 2 |
6 files changed, 4 insertions, 71 deletions
diff --git a/sys/ia64/ia64/busdma_machdep.c b/sys/ia64/ia64/busdma_machdep.c index 6696c58..5fa3ee5 100644 --- a/sys/ia64/ia64/busdma_machdep.c +++ b/sys/ia64/ia64/busdma_machdep.c @@ -694,7 +694,7 @@ free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage) STAILQ_INSERT_TAIL(&bounce_map_callbacklist, map, links); busdma_swi_pending = 1; - setsoftvm(); + sched_swi(vm_ih, SWI_NOSWITCH); } } splx(s); diff --git a/sys/ia64/ia64/ipl_funcs.c b/sys/ia64/ia64/ipl_funcs.c index 8acc1f2..3f98cf7 100644 --- a/sys/ia64/ia64/ipl_funcs.c +++ b/sys/ia64/ia64/ipl_funcs.c @@ -27,64 +27,9 @@ */ #include <sys/param.h> -#include <sys/bus.h> #include <sys/systm.h> -#include <sys/kernel.h> -#include <sys/sysctl.h> -#include <sys/ktr.h> -#include <sys/interrupt.h> -#include <machine/ipl.h> -#include <machine/cpu.h> -#include <machine/globaldata.h> -#include <machine/globals.h> -#include <machine/mutex.h> -#include <net/netisr.h> - -#include "sio.h" unsigned int bio_imask; /* XXX */ unsigned int cam_imask; /* XXX */ unsigned int net_imask; /* XXX */ unsigned int tty_imask; /* XXX */ - -static void swi_net(void); - -void (*netisrs[32]) __P((void)); -swihand_t *shandlers[32] = { /* software interrupts */ - swi_null, swi_net, swi_null, swi_null, - swi_null, swi_null, softclock, swi_null, - swi_null, swi_null, swi_null, swi_null, - swi_null, swi_null, swi_null, swi_null, - swi_null, swi_null, swi_null, swi_null, - swi_null, swi_null, swi_null, swi_null, - swi_null, swi_null, swi_null, swi_null, - swi_null, swi_null, swi_null, swi_null, -}; - -u_int32_t netisr; - -void -swi_null() -{ - /* No interrupt registered, do nothing */ -} - -void -swi_generic() -{ - /* Just a placeholder, we call swi_dispatcher directly */ - panic("swi_generic() called"); -} - -static void -swi_net() -{ - u_int32_t bits = atomic_readandclear_32(&netisr); - int i; - - for (i = 0; i < 32; i++) { - if (bits & 1) - netisrs[i](); - bits >>= 1; - } -} diff --git a/sys/ia64/ia64/mem.c b/sys/ia64/ia64/mem.c index b3f5531..1522ecf 100644 --- a/sys/ia64/ia64/mem.c +++ b/sys/ia64/ia64/mem.c @@ -95,12 +95,6 @@ static struct cdevsw mem_cdevsw = { /* bmaj */ -1 }; -#if NHWI > 0 -#define ICU_LEN (NHWI) -#else -#define ICU_LEN (NSWI) -#endif - struct mem_range_softc mem_range_softc; static int diff --git a/sys/ia64/ia64/vm_machdep.c b/sys/ia64/ia64/vm_machdep.c index fee46d6..1c57552 100644 --- a/sys/ia64/ia64/vm_machdep.c +++ b/sys/ia64/ia64/vm_machdep.c @@ -519,7 +519,7 @@ vm_page_zero_idle() * Software interrupt handler for queued VM system processing. */ void -swi_vm() +swi_vm(void *dummy) { #if 0 if (busdma_swi_pending != 0) diff --git a/sys/ia64/include/ipl.h b/sys/ia64/include/ipl.h index bb62be4..dd1f129 100644 --- a/sys/ia64/include/ipl.h +++ b/sys/ia64/include/ipl.h @@ -30,12 +30,6 @@ #define _MACHINE_IPL_H_ /* - * Software interrupt bit numbers - */ -#define NSWI 32 -#define NHWI 0 - -/* * Interprocessor interrupts for SMP. */ #define IPI_INVLTLB 0x0001 @@ -50,4 +44,4 @@ void smp_ipi_all_but_self(u_int64_t ipi); void smp_ipi_self(u_int64_t ipi); void smp_handle_ipi(struct trapframe *frame); -#endif /* !_MACHINE_MD_VAR_H_ */ +#endif /* !_MACHINE_IPL_H_ */ diff --git a/sys/ia64/include/md_var.h b/sys/ia64/include/md_var.h index eeaff20..fb1b4b5 100644 --- a/sys/ia64/include/md_var.h +++ b/sys/ia64/include/md_var.h @@ -47,7 +47,7 @@ void busdma_swi __P((void)); void cpu_halt __P((void)); void cpu_reset __P((void)); int is_physical_memory __P((vm_offset_t addr)); -void swi_vm __P((void)); +void swi_vm __P((void *)); int vm_page_zero_idle __P((void)); int fill_regs __P((struct proc *, struct reg *)); int set_regs __P((struct proc *, struct reg *)); |