summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_intr.c
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2002-09-22 05:56:41 +0000
committerjake <jake@FreeBSD.org>2002-09-22 05:56:41 +0000
commite54737666a584849daea897dbaf548d7ea1b8233 (patch)
treeda1088de2fb25dba3e43139bc803c958f4ba8778 /sys/kern/kern_intr.c
parentd56eff1783038f79613ef8f4e96f36ee97576ece (diff)
downloadFreeBSD-src-e54737666a584849daea897dbaf548d7ea1b8233.zip
FreeBSD-src-e54737666a584849daea897dbaf548d7ea1b8233.tar.gz
Moved netisr code from kern/kern_intr.c to net/netisr.c as threatened in a
comment.
Diffstat (limited to 'sys/kern/kern_intr.c')
-rw-r--r--sys/kern/kern_intr.c80
1 files changed, 1 insertions, 79 deletions
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c
index 4eb5c1f..af6e59b 100644
--- a/sys/kern/kern_intr.c
+++ b/sys/kern/kern_intr.c
@@ -57,7 +57,6 @@ struct int_entropy {
int vector;
};
-void *net_ih;
void *vm_ih;
void *softclock_ih;
struct ithd *clk_ithd;
@@ -68,7 +67,6 @@ static MALLOC_DEFINE(M_ITHREAD, "ithread", "Interrupt Threads");
static void ithread_update(struct ithd *);
static void ithread_loop(void *);
static void start_softintr(void *);
-static void swi_net(void *);
u_char
ithread_priority(enum intr_type flags)
@@ -571,8 +569,7 @@ static void
start_softintr(void *dummy)
{
- if (swi_add(NULL, "net", swi_net, NULL, SWI_NET, 0, &net_ih) ||
- swi_add(&clk_ithd, "clock", softclock, NULL, SWI_CLOCK,
+ if (swi_add(&clk_ithd, "clock", softclock, NULL, SWI_CLOCK,
INTR_MPSAFE, &softclock_ih) ||
swi_add(NULL, "vm", swi_vm, NULL, SWI_VM, 0, &vm_ih))
panic("died while creating standard software ithreads");
@@ -583,81 +580,6 @@ start_softintr(void *dummy)
}
SYSINIT(start_softintr, SI_SUB_SOFTINTR, SI_ORDER_FIRST, start_softintr, NULL)
-void
-legacy_setsoftnet(void)
-{
- swi_sched(net_ih, 0);
-}
-
-/*
- * XXX: This should really be in the network code somewhere and installed
- * via a SI_SUB_SOFINTR, SI_ORDER_MIDDLE sysinit.
- */
-void (*netisrs[32])(void);
-volatile unsigned int netisr; /* scheduling bits for network */
-
-int
-register_netisr(num, handler)
- int num;
- netisr_t *handler;
-{
-
- if (num < 0 || num >= (sizeof(netisrs)/sizeof(*netisrs)) ) {
- printf("register_netisr: bad isr number: %d\n", num);
- return (EINVAL);
- }
- netisrs[num] = handler;
- return (0);
-}
-
-int
-unregister_netisr(num)
- int num;
-{
-
- if (num < 0 || num >= (sizeof(netisrs)/sizeof(*netisrs)) ) {
- printf("unregister_netisr: bad isr number: %d\n", num);
- return (EINVAL);
- }
- netisrs[num] = NULL;
- return (0);
-}
-
-#ifdef DEVICE_POLLING
- void netisr_pollmore(void);
-#endif
-
-static void
-swi_net(void *dummy)
-{
- u_int bits;
- int i;
-
-#ifdef DEVICE_POLLING
- for (;;) {
- int pollmore;
-#endif
- bits = atomic_readandclear_int(&netisr);
-#ifdef DEVICE_POLLING
- if (bits == 0)
- return;
- pollmore = bits & (1 << NETISR_POLL);
-#endif
- while ((i = ffs(bits)) != 0) {
- i--;
- if (netisrs[i] != NULL)
- netisrs[i]();
- else
- printf("swi_net: unregistered isr number: %d.\n", i);
- bits &= ~(1 << i);
- }
-#ifdef DEVICE_POLLING
- if (pollmore)
- netisr_pollmore();
- }
-#endif
-}
-
/*
* Sysctls used by systat and others: hw.intrnames and hw.intrcnt.
* The data for this machine dependent, and the declarations are in machine
OpenPOWER on IntegriCloud