diff options
author | jake <jake@FreeBSD.org> | 2000-12-05 00:36:00 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2000-12-05 00:36:00 +0000 |
commit | c972e7aad1a6bdf921bbf261f2f93198504e35cf (patch) | |
tree | b876f909539180fd92ecf8b69c03628ef8dde722 | |
parent | 6715d70e6f2e707c60520a2cff9de2edfb429f0e (diff) | |
download | FreeBSD-src-c972e7aad1a6bdf921bbf261f2f93198504e35cf.zip FreeBSD-src-c972e7aad1a6bdf921bbf261f2f93198504e35cf.tar.gz |
Remove the last of the MD netisr code. It is now all MI. Remove
spending, which was unused now that all software interrupts have
their own thread. Make the legacy schednetisr use an atomic op
for setting bits in the netisr mask.
Reviewed by: jhb
-rw-r--r-- | sys/alpha/alpha/machdep.c | 27 | ||||
-rw-r--r-- | sys/alpha/include/md_var.h | 1 | ||||
-rw-r--r-- | sys/amd64/amd64/machdep.c | 27 | ||||
-rw-r--r-- | sys/amd64/include/md_var.h | 1 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 27 | ||||
-rw-r--r-- | sys/i386/include/asnames.h | 2 | ||||
-rw-r--r-- | sys/i386/include/md_var.h | 1 | ||||
-rw-r--r-- | sys/i386/isa/ipl.s | 26 | ||||
-rw-r--r-- | sys/ia64/ia64/machdep.c | 27 | ||||
-rw-r--r-- | sys/ia64/include/md_var.h | 1 | ||||
-rw-r--r-- | sys/kern/kern_intr.c | 27 | ||||
-rw-r--r-- | sys/net/netisr.h | 6 | ||||
-rw-r--r-- | sys/powerpc/include/md_var.h | 1 |
13 files changed, 32 insertions, 142 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index 9c3ace5..e91ee19 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -421,33 +421,6 @@ again: #endif /* SMP */ } -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); -} - /* * Retrieve the platform name from the DSR. */ diff --git a/sys/alpha/include/md_var.h b/sys/alpha/include/md_var.h index a2f70b6..9439319 100644 --- a/sys/alpha/include/md_var.h +++ b/sys/alpha/include/md_var.h @@ -38,7 +38,6 @@ extern char esigcode[]; extern int szsigcode; extern int Maxmem; extern int busdma_swi_pending; -extern void (*netisrs[32]) __P((void)); struct fpreg; struct proc; diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 5c05929..a6f92b1 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -440,33 +440,6 @@ again: cpu_setregs(); } -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); -} - /* * Send an interrupt to process. * diff --git a/sys/amd64/include/md_var.h b/sys/amd64/include/md_var.h index 312d313..5a2ed26 100644 --- a/sys/amd64/include/md_var.h +++ b/sys/amd64/include/md_var.h @@ -54,7 +54,6 @@ extern char kstack[]; extern int need_pre_dma_flush; extern int need_post_dma_flush; #endif -extern void (*netisrs[32]) __P((void)); extern int nfs_diskless_valid; extern void (*ovbcopy_vector) __P((const void *from, void *to, size_t len)); extern char sigcode[]; diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 5c05929..a6f92b1 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -440,33 +440,6 @@ again: cpu_setregs(); } -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); -} - /* * Send an interrupt to process. * diff --git a/sys/i386/include/asnames.h b/sys/i386/include/asnames.h index b99b9af..d514b29 100644 --- a/sys/i386/include/asnames.h +++ b/sys/i386/include/asnames.h @@ -252,8 +252,6 @@ #define __mtx_exit_giant_def _mtx_exit_giant_def #define _mul64 mul64 #define _net_imask net_imask -#define _netisr netisr -#define _netisrs netisrs #define _nfs_diskless nfs_diskless #define _nfs_diskless_valid nfs_diskless_valid #define _normalize normalize diff --git a/sys/i386/include/md_var.h b/sys/i386/include/md_var.h index 312d313..5a2ed26 100644 --- a/sys/i386/include/md_var.h +++ b/sys/i386/include/md_var.h @@ -54,7 +54,6 @@ extern char kstack[]; extern int need_pre_dma_flush; extern int need_post_dma_flush; #endif -extern void (*netisrs[32]) __P((void)); extern int nfs_diskless_valid; extern void (*ovbcopy_vector) __P((const void *from, void *to, size_t len)); extern char sigcode[]; diff --git a/sys/i386/isa/ipl.s b/sys/i386/isa/ipl.s index f5d4926..a079d2c 100644 --- a/sys/i386/isa/ipl.s +++ b/sys/i386/isa/ipl.s @@ -68,25 +68,6 @@ _softnet_imask: .long 0 .globl _softtty_imask _softtty_imask: .long 0 -/* pending software interrupts */ - .globl _spending -_spending: .long 0 - -/* set with bits for which queue to service */ - .globl _netisr -_netisr: .long 0 - - .globl _netisrs -_netisrs: - .long dummynetisr, dummynetisr, dummynetisr, dummynetisr - .long dummynetisr, dummynetisr, dummynetisr, dummynetisr - .long dummynetisr, dummynetisr, dummynetisr, dummynetisr - .long dummynetisr, dummynetisr, dummynetisr, dummynetisr - .long dummynetisr, dummynetisr, dummynetisr, dummynetisr - .long dummynetisr, dummynetisr, dummynetisr, dummynetisr - .long dummynetisr, dummynetisr, dummynetisr, dummynetisr - .long dummynetisr, dummynetisr, dummynetisr, dummynetisr - .text /* @@ -173,13 +154,6 @@ doreti_ast: movb $1,_intr_nesting_level /* for doreti_next to decrement */ jmp doreti_next - ALIGN_TEXT -dummynetisr: - MCOUNT - ret - - - #ifdef APIC_IO #include "i386/isa/apic_ipl.s" #else diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index bc0ae1b..a4ff91a 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -343,33 +343,6 @@ again: vm_pager_bufferinit(); } -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); -} - static void identifycpu(void) { diff --git a/sys/ia64/include/md_var.h b/sys/ia64/include/md_var.h index fb1b4b5..9e64106 100644 --- a/sys/ia64/include/md_var.h +++ b/sys/ia64/include/md_var.h @@ -37,7 +37,6 @@ extern char sigcode[]; extern char esigcode[]; extern int szsigcode; extern int Maxmem; -extern void (*netisrs[32]) __P((void)); struct fpreg; struct proc; diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index dcd422a..9ce6d6d 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -275,6 +275,33 @@ legacy_setsoftnet() void (*netisrs[32]) __P((void)); u_int netisr; +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); +} + static void swi_net(void *dummy) { diff --git a/sys/net/netisr.h b/sys/net/netisr.h index f227fb2..621cf22 100644 --- a/sys/net/netisr.h +++ b/sys/net/netisr.h @@ -71,7 +71,11 @@ void legacy_setsoftnet __P((void)); extern volatile unsigned int netisr; /* scheduling bits for network */ -#define schednetisr(anisr) { netisr |= 1 << (anisr); legacy_setsoftnet(); } +extern void (*netisrs[32]) __P((void)); +#define schednetisr(anisr) do { \ + atomic_set_rel_int(&netisr, 1 << (anisr)); \ + legacy_setsoftnet(); \ +} while (0) typedef void netisr_t __P((void)); diff --git a/sys/powerpc/include/md_var.h b/sys/powerpc/include/md_var.h index a2f70b6..9439319 100644 --- a/sys/powerpc/include/md_var.h +++ b/sys/powerpc/include/md_var.h @@ -38,7 +38,6 @@ extern char esigcode[]; extern int szsigcode; extern int Maxmem; extern int busdma_swi_pending; -extern void (*netisrs[32]) __P((void)); struct fpreg; struct proc; |