]> git.neil.brown.name Git - history.git/commitdiff
[SOFTIRQ]: Move softirq implementation to common area, add debug check.
authorDavid S. Miller <davem@nuts.ninka.net>
Mon, 31 Mar 2003 06:32:13 +0000 (22:32 -0800)
committerDavid S. Miller <davem@nuts.ninka.net>
Mon, 31 Mar 2003 06:32:13 +0000 (22:32 -0800)
1) Every arch implemented local_bh_foo identically, move to
   linux/interrupt.h
2) Kill all asm/softirq.h references
3) Kill asm/softirq.h itself
4) Move local_bh_disable() out of line to kernel/softirq.c
5) Add BUG check on irqs_disabled() to local_bh_disable()

55 files changed:
arch/alpha/kernel/alpha_ksyms.c
arch/alpha/kernel/smp.c
arch/ia64/sn/kernel/sv.c
arch/m68k/kernel/m68k_ksyms.c
arch/m68knommu/kernel/m68k_ksyms.c
arch/mips/kernel/mips_ksyms.c
arch/mips/kernel/smp.c
arch/mips/mm/fault.c
arch/mips64/kernel/mips64_ksyms.c
arch/mips64/kernel/smp.c
arch/mips64/mm/fault.c
arch/ppc/kernel/smp.c
arch/ppc/platforms/chrp_smp.c
arch/ppc/platforms/pmac_smp.c
arch/ppc64/kernel/smp.c
arch/s390/kernel/s390_ksyms.c
arch/s390x/kernel/s390_ksyms.c
arch/sparc/kernel/irq.c
arch/sparc/kernel/setup.c
arch/sparc/kernel/smp.c
arch/sparc/kernel/sparc_ksyms.c
arch/sparc/kernel/sun4d_smp.c
arch/sparc/kernel/sun4m_smp.c
arch/sparc64/kernel/irq.c
arch/sparc64/kernel/smp.c
arch/sparc64/kernel/sparc64_ksyms.c
arch/um/drivers/stdio_console.c
arch/um/kernel/smp.c
arch/v850/kernel/v850_ksyms.c
crypto/internal.h
include/asm-alpha/softirq.h [deleted file]
include/asm-arm/hardirq.h
include/asm-arm/softirq.h [deleted file]
include/asm-cris/softirq.h [deleted file]
include/asm-i386/hardirq.h
include/asm-i386/softirq.h [deleted file]
include/asm-ia64/softirq.h [deleted file]
include/asm-m68k/softirq.h [deleted file]
include/asm-m68knommu/softirq.h [deleted file]
include/asm-mips/softirq.h [deleted file]
include/asm-mips64/softirq.h [deleted file]
include/asm-parisc/softirq.h [deleted file]
include/asm-ppc/softirq.h [deleted file]
include/asm-ppc64/softirq.h [deleted file]
include/asm-s390/softirq.h [deleted file]
include/asm-s390x/softirq.h [deleted file]
include/asm-sh/softirq.h [deleted file]
include/asm-sparc/softirq.h [deleted file]
include/asm-sparc64/softirq.h [deleted file]
include/asm-um/softirq.h [deleted file]
include/asm-v850/softirq.h [deleted file]
include/asm-x86_64/softirq.h [deleted file]
include/linux/interrupt.h
include/linux/mtd/compatmac.h
kernel/softirq.c

index ee3db0c214baf57401f164c2babc2d40aca80f89..c9a1d55d0dbd9f586bcd2a0d129c47fb6327e68a 100644 (file)
@@ -25,7 +25,6 @@
 #include <asm/processor.h>
 #include <asm/checksum.h>
 #include <linux/interrupt.h>
-#include <asm/softirq.h>
 #include <asm/fpu.h>
 #include <asm/irq.h>
 #include <asm/machvec.h>
index 4cfc0a679a7dfb4e76be450dbf3c9808509e178d..b23cde1f1a99ba958385744ba2801ce411b0800a 100644 (file)
@@ -35,7 +35,6 @@
 #include <asm/pgtable.h>
 #include <asm/pgalloc.h>
 #include <asm/hardirq.h>
-#include <asm/softirq.h>
 #include <asm/mmu_context.h>
 #include <asm/tlbflush.h>
 
index 5bc910514e5500b808eeeb242b6f6400472d3abc..84bedef9f6e288d5f12a492fbd194a0f35e13168 100644 (file)
@@ -18,7 +18,6 @@
 
 #include <asm/semaphore.h>
 #include <asm/hardirq.h>
-#include <asm/softirq.h>
 #include <asm/current.h>
 
 #include <asm/sn/sv.h>
index 3a40bfc2438e87101abdc6f346b655367aada39e..b069b0c843b36771eb623be03525192e695ad8d0 100644 (file)
@@ -17,7 +17,6 @@
 #include <asm/semaphore.h>
 #include <asm/checksum.h>
 #include <asm/hardirq.h>
-#include <asm/softirq.h>
 
 asmlinkage long long __ashldi3 (long long, int);
 asmlinkage long long __ashrdi3 (long long, int);
index becd58cc9ea85d88a2f3e91060f3131b0c9e24b6..7700ca82af8328f550f97f0a39db9983e38b27ff 100644 (file)
@@ -17,7 +17,6 @@
 #include <asm/semaphore.h>
 #include <asm/checksum.h>
 #include <asm/hardirq.h>
-#include <asm/softirq.h>
 #include <asm/current.h>
 
 extern void dump_thread(struct pt_regs *, struct user *);
index 1ee7d3939ec84a7deda78880e9208af9b0b0d7b2..3109b7485a8c7bf49b6a7481d1321b1a46abeee9 100644 (file)
@@ -25,7 +25,6 @@
 #include <asm/pgalloc.h>
 #include <asm/semaphore.h>
 #include <asm/sgi/sgihpc.h>
-#include <asm/softirq.h>
 #include <asm/uaccess.h>
 #ifdef CONFIG_BLK_DEV_FD
 #include <asm/floppy.h>
index f766ead50818f867c2427fafa5c22be7da951b0a..36e55ea4d57ee433b085fdcd16e011e2e3585bdf 100644 (file)
@@ -37,7 +37,6 @@
 #include <asm/processor.h>
 #include <asm/system.h>
 #include <asm/hardirq.h>
-#include <asm/softirq.h>
 #include <asm/mmu_context.h>
 #include <asm/delay.h>
 #include <asm/smp.h>
index 286d2648fad07342a962625db79f6a6c8b25b5e4..8e648749ec7889bb07baa13fe36bb426a9d1e5d6 100644 (file)
@@ -22,7 +22,6 @@
 #include <asm/hardirq.h>
 #include <asm/pgalloc.h>
 #include <asm/mmu_context.h>
-#include <asm/softirq.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
 
index c18a50df3ada105cc2c80a07bd1c5fce96dd062b..230a5bf5930438e28a5f0f64a04e660a2411293c 100644 (file)
@@ -24,7 +24,6 @@
 #include <asm/page.h>
 #include <asm/pgalloc.h>
 #include <asm/semaphore.h>
-#include <asm/softirq.h>
 #include <asm/uaccess.h>
 #include <asm/checksum.h>
 
index 9ccb54fa72b5a6df4cd74893f71726928dd0c9a1..757e6e44fda6a27f3d9479e6a3f1a5f20b57a467 100644 (file)
@@ -6,12 +6,12 @@
 #include <linux/timex.h>
 #include <linux/sched.h>
 #include <linux/cache.h>
+#include <linux/interrupt.h>
 
 #include <asm/atomic.h>
 #include <asm/processor.h>
 #include <asm/system.h>
 #include <asm/hardirq.h>
-#include <asm/softirq.h>
 #include <asm/mmu_context.h>
 #include <asm/irq.h>
 
index 68326e7362ade1f7db5a52c316e7482b7aa5d224..ba3cc05a1106f32c70fac7388b627296202916c8 100644 (file)
@@ -24,7 +24,6 @@
 #include <asm/hardirq.h>
 #include <asm/pgalloc.h>
 #include <asm/mmu_context.h>
-#include <asm/softirq.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
 #include <asm/ptrace.h>
index e5094573c5c041e929441d4531d7e90220299b82..21a23f743738d2a29b9f5658c398c5bc6ca59581 100644 (file)
@@ -28,7 +28,6 @@
 #include <asm/page.h>
 #include <asm/pgtable.h>
 #include <asm/hardirq.h>
-#include <asm/softirq.h>
 #include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/smp.h>
index cee354253e49e3d784305257ae060428215dde8f..a776b83bf8dad2262c5bc7938c939f9be10b1fec 100644 (file)
@@ -27,7 +27,6 @@
 #include <asm/page.h>
 #include <asm/pgtable.h>
 #include <asm/hardirq.h>
-#include <asm/softirq.h>
 #include <asm/sections.h>
 #include <asm/io.h>
 #include <asm/prom.h>
index 6bbe4819de1a3ae624a64f98d3eb0c3166ad031b..f558e977e24247cbc94cd3b5c3ac179f3ebc9b25 100644 (file)
@@ -35,7 +35,6 @@
 #include <asm/page.h>
 #include <asm/pgtable.h>
 #include <asm/hardirq.h>
-#include <asm/softirq.h>
 #include <asm/sections.h>
 #include <asm/io.h>
 #include <asm/prom.h>
index 44bd8bb70914b81bd3588eaf2bb774782ce45d22..f52f6c9f5f9f01be70f620c0d0b70953a4f6e5b6 100644 (file)
@@ -34,7 +34,6 @@
 #include <asm/page.h>
 #include <asm/pgtable.h>
 #include <asm/hardirq.h>
-#include <asm/softirq.h>
 #include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/smp.h>
index 00c4cf2f121072aa640c4b7f6b21ea8033e94e46..0f4a0046a732791eb7c9de389d23a9b6bcf46ebc 100644 (file)
@@ -6,10 +6,10 @@
 #include <linux/config.h>
 #include <linux/module.h>
 #include <linux/smp.h>
+#include <linux/interrupt.h>
 #include <asm/checksum.h>
 #include <asm/delay.h>
 #include <asm/setup.h>
-#include <asm/softirq.h>
 #if CONFIG_IP_MULTICAST
 #include <net/arp.h>
 #endif
index 20561a6fc9a162477371e4a726ca45665106b80c..d7b3fac0b5fc82c84094d6ead5fcde93fc47320d 100644 (file)
@@ -8,11 +8,11 @@
 #include <linux/module.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
+#include <linux/interrupt.h>
 #include <asm/checksum.h>
 #include <asm/delay.h>
 #include <asm/pgalloc.h>
 #include <asm/setup.h>
-#include <asm/softirq.h>
 #if CONFIG_IP_MULTICAST
 #include <net/arp.h>
 #endif
index 311338e036448fdb2b05c793634ffda85b71a01d..ea9ce5c9861e18000867a5f5921324d846a05d01 100644 (file)
@@ -45,7 +45,6 @@
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
 #include <asm/hardirq.h>
-#include <asm/softirq.h>
 #include <asm/pcic.h>
 #include <asm/cacheflush.h>
 
index 24b37f81f518fbcd7890f1b183f2b4bf06602d26..48900efa83a26c69bfca952b7cbad9d57b1b6275 100644 (file)
@@ -43,7 +43,6 @@
 #include <asm/kdebug.h>
 #include <asm/mbus.h>
 #include <asm/idprom.h>
-#include <asm/softirq.h>
 #include <asm/hardirq.h>
 #include <asm/machines.h>
 
index b4ca31eecb2022d7afa05ece80c13c3adf172b8d..73a2386bef49766823d3489bb96780144e908e3c 100644 (file)
@@ -30,7 +30,6 @@
 #include <asm/pgtable.h>
 #include <asm/oplib.h>
 #include <asm/hardirq.h>
-#include <asm/softirq.h>
 
 #define __KERNEL_SYSCALLS__
 #include <linux/unistd.h>
index f31a846379e32e5bfb425012c78eb67ace44110d..d67ca33754eecade22ba2e92763c40786ac34bb6 100644 (file)
@@ -40,7 +40,6 @@
 #include <asm/smp.h>
 #include <asm/mostek.h>
 #include <asm/ptrace.h>
-#include <asm/softirq.h>
 #include <asm/hardirq.h>
 #include <asm/user.h>
 #include <asm/uaccess.h>
index 0597e81b5109529102e5950ed74a538520b85c21..9810917d2bffd056da4b66cadce74f0ae8ca7275 100644 (file)
@@ -29,7 +29,6 @@
 #include <asm/pgtable.h>
 #include <asm/oplib.h>
 #include <asm/hardirq.h>
-#include <asm/softirq.h>
 #include <asm/sbus.h>
 #include <asm/sbi.h>
 
index 27f64763f7de72b664e44abf296f33cc161701ab..a0432f504bd38f5d815140b4da13415d497b5cfb 100644 (file)
@@ -26,7 +26,6 @@
 #include <asm/pgtable.h>
 #include <asm/oplib.h>
 #include <asm/hardirq.h>
-#include <asm/softirq.h>
 
 #define __KERNEL_SYSCALLS__
 #include <linux/unistd.h>
index 53f0cb708537d8556d39efa2c24be731ed3c0597..03b8432b779a2edbc4f9e49d3cbd361cf10c5603 100644 (file)
@@ -33,7 +33,6 @@
 #include <asm/timer.h>
 #include <asm/smp.h>
 #include <asm/hardirq.h>
-#include <asm/softirq.h>
 #include <asm/starfire.h>
 #include <asm/uaccess.h>
 #include <asm/cache.h>
index 3745aec1b7ddd2b7c32c890453e4903e173f0208..cf73f8df0f0dd175a3e3f10a0c9dfcdd22e3273f 100644 (file)
@@ -31,7 +31,6 @@
 #include <asm/pgtable.h>
 #include <asm/oplib.h>
 #include <asm/hardirq.h>
-#include <asm/softirq.h>
 #include <asm/uaccess.h>
 #include <asm/timer.h>
 #include <asm/starfire.h>
index ca86ddcd90b986e3174d097b5aa070a4047323e9..f12121dbcf83f1b4c19c06a36623b4a2be8de1c0 100644 (file)
@@ -30,7 +30,6 @@
 #include <asm/pgtable.h>
 #include <asm/io.h>
 #include <asm/irq.h>
-#include <asm/softirq.h>
 #include <asm/hardirq.h>
 #include <asm/idprom.h>
 #include <asm/svr4.h>
index e161b413f677651f923e4d809857209786c83b3e..4aaec540e50525e638fd6623e66c78d1e8efcad7 100644 (file)
@@ -18,7 +18,6 @@
 #include "linux/interrupt.h"
 #include "linux/slab.h"
 #include "asm/current.h"
-#include "asm/softirq.h"
 #include "asm/hardirq.h"
 #include "asm/irq.h"
 #include "stdio_console.h"
index adc58d1b34dea093ef2abf574dc5e34bf498c853..227580b4bc5069a908954472fbc2ff3e994413e2 100644 (file)
@@ -17,7 +17,6 @@ unsigned long cpu_online_map = 1;
 #include "asm/smp.h"
 #include "asm/processor.h"
 #include "asm/spinlock.h"
-#include "asm/softirq.h"
 #include "asm/hardirq.h"
 #include "user_util.h"
 #include "kern_util.h"
index 86b866358b9b9853eb96e7a3e4384efdf9071962..74bf9ace4c7e91aa65f43f0bc7b7ee57e8a83c10 100644 (file)
@@ -16,7 +16,6 @@
 #include <asm/semaphore.h>
 #include <asm/checksum.h>
 #include <asm/hardirq.h>
-#include <asm/softirq.h>
 #include <asm/current.h>
 
 
index b67c0ee8fe549bf41d5f5c45de64153e40f7d3ac..10880d149afedb1609bc486a353ea460d3a40042 100644 (file)
@@ -13,9 +13,9 @@
 #define _CRYPTO_INTERNAL_H
 #include <linux/mm.h>
 #include <linux/highmem.h>
+#include <linux/interrupt.h>
 #include <linux/init.h>
 #include <asm/hardirq.h>
-#include <asm/softirq.h>
 #include <asm/kmap_types.h>
 
 extern enum km_type crypto_km_types[];
diff --git a/include/asm-alpha/softirq.h b/include/asm-alpha/softirq.h
deleted file mode 100644 (file)
index 401ea9e..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef _ALPHA_SOFTIRQ_H
-#define _ALPHA_SOFTIRQ_H
-
-#include <linux/preempt.h>
-#include <asm/hardirq.h>
-
-#define local_bh_disable() \
-               do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
-#define __local_bh_enable() \
-               do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
-
-#define local_bh_enable()                                      \
-do {                                                           \
-       __local_bh_enable();                                    \
-       if (unlikely(!in_interrupt() &&                         \
-                    softirq_pending(smp_processor_id())))      \
-               do_softirq();                                   \
-       preempt_check_resched();                                \
-} while (0)
-
-#endif /* _ALPHA_SOFTIRQ_H */
index 3f164e01f7a1497bf3fda303f198860ef9ef8ab1..df9f03a8dcf17b900082851a014ab8cd851e8213 100644 (file)
@@ -5,7 +5,6 @@
 #include <linux/cache.h>
 #include <linux/threads.h>
 
-/* softirq.h is sensitive to the offsets of these fields */
 typedef struct {
        unsigned int __softirq_pending;
        unsigned int __local_irq_count;
diff --git a/include/asm-arm/softirq.h b/include/asm-arm/softirq.h
deleted file mode 100644 (file)
index 3dfcdb1..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __ASM_SOFTIRQ_H
-#define __ASM_SOFTIRQ_H
-
-#include <linux/preempt.h>
-#include <asm/hardirq.h>
-
-#define local_bh_disable() \
-       do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
-#define __local_bh_enable() \
-       do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
-
-#define local_bh_enable()                                              \
-do {                                                                   \
-       __local_bh_enable();                                            \
-       if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \
-               __asm__("bl%? __do_softirq": : : "lr");/* out of line */\
-       preempt_check_resched();                                        \
-} while (0)
-
-#endif /* __ASM_SOFTIRQ_H */
diff --git a/include/asm-cris/softirq.h b/include/asm-cris/softirq.h
deleted file mode 100644 (file)
index c5b2d88..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef __ASM_SOFTIRQ_H
-#define __ASM_SOFTIRQ_H
-
-#include <asm/atomic.h>
-#include <asm/hardirq.h>
-
-#define local_bh_disable()                      \
-do {                                            \
-        local_bh_count(smp_processor_id())++;   \
-        barrier();                              \
-} while (0)
-
-#define __local_bh_enable()                     \
-do {                                            \
-        barrier();                              \
-        local_bh_count(smp_processor_id())--;   \
-} while (0)
-
-#define local_bh_enable()                               \
-do {                                                    \
-        if (!--local_bh_count(smp_processor_id())       \
-            && softirq_pending(smp_processor_id())) {   \
-                do_softirq();                           \
-                local_irq_enable();                                \
-        }                                               \
-} while (0)
-
-#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
-
-#endif /* __ASM_SOFTIRQ_H */
index 6dfd2ceebf3a6d8e25e99d8af2b5e6d1fc176a7c..e8b9149f0b29500421730c25c4c6b959711a3cac 100644 (file)
@@ -5,7 +5,6 @@
 #include <linux/threads.h>
 #include <linux/irq.h>
 
-/* assembly code in softirq.h is sensitive to the offsets of these fields */
 typedef struct {
        unsigned int __softirq_pending;
        unsigned int __syscall_count;
diff --git a/include/asm-i386/softirq.h b/include/asm-i386/softirq.h
deleted file mode 100644 (file)
index d944be9..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __ASM_SOFTIRQ_H
-#define __ASM_SOFTIRQ_H
-
-#include <linux/preempt.h>
-#include <asm/hardirq.h>
-
-#define local_bh_disable() \
-               do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
-#define __local_bh_enable() \
-               do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
-
-#define local_bh_enable()                                              \
-do {                                                                   \
-       __local_bh_enable();                                            \
-       if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \
-               do_softirq();                                           \
-       preempt_check_resched();                                        \
-} while (0)
-
-#endif /* __ASM_SOFTIRQ_H */
diff --git a/include/asm-ia64/softirq.h b/include/asm-ia64/softirq.h
deleted file mode 100644 (file)
index a50f2d2..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef _ASM_IA64_SOFTIRQ_H
-#define _ASM_IA64_SOFTIRQ_H
-
-#include <linux/compiler.h>
-
-/*
- * Copyright (C) 1998-2002 Hewlett-Packard Co
- *     David Mosberger-Tang <davidm@hpl.hp.com>
- */
-#include <linux/compiler.h>
-#include <linux/preempt.h>
-
-#include <asm/hardirq.h>
-
-#define __local_bh_enable()    do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
-
-#define local_bh_disable()     do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
-#define local_bh_enable()                                              \
-do {                                                                   \
-       __local_bh_enable();                                            \
-       if (unlikely(!in_interrupt() && local_softirq_pending()))       \
-               do_softirq();                                           \
-       preempt_check_resched();                                        \
-} while (0)
-
-#endif /* _ASM_IA64_SOFTIRQ_H */
diff --git a/include/asm-m68k/softirq.h b/include/asm-m68k/softirq.h
deleted file mode 100644 (file)
index 0c2f0e2..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef __M68K_SOFTIRQ_H
-#define __M68K_SOFTIRQ_H
-
-/*
- * Software interrupts.. no SMP here either.
- */
-
-#include <asm/atomic.h>
-#include <asm/hardirq.h>
-
-#define local_bh_disable() \
-               do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
-#define __local_bh_enable() \
-               do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
-
-#define local_bh_enable()                                              \
-do {                                                                   \
-       __local_bh_enable();                                            \
-       if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \
-               do_softirq();                                           \
-       preempt_check_resched();                                        \
-} while (0)
-
-#endif
diff --git a/include/asm-m68knommu/softirq.h b/include/asm-m68knommu/softirq.h
deleted file mode 100644 (file)
index d944be9..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __ASM_SOFTIRQ_H
-#define __ASM_SOFTIRQ_H
-
-#include <linux/preempt.h>
-#include <asm/hardirq.h>
-
-#define local_bh_disable() \
-               do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
-#define __local_bh_enable() \
-               do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
-
-#define local_bh_enable()                                              \
-do {                                                                   \
-       __local_bh_enable();                                            \
-       if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \
-               do_softirq();                                           \
-       preempt_check_resched();                                        \
-} while (0)
-
-#endif /* __ASM_SOFTIRQ_H */
diff --git a/include/asm-mips/softirq.h b/include/asm-mips/softirq.h
deleted file mode 100644 (file)
index 6462027..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1997, 1998, 1999, 2000, 2001 Ralf Baechle
- * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
- * Copyright (C) 1999, 2001 MIPS Technologies, Inc.
- */
-#ifndef _ASM_SOFTIRQ_H
-#define _ASM_SOFTIRQ_H
-
-#include <asm/atomic.h>
-#include <asm/hardirq.h>
-
-extern inline void cpu_bh_disable(int cpu)
-{
-       local_bh_count(cpu)++;
-       barrier();
-}
-extern inline void __cpu_bh_enable(int cpu)
-{
-       barrier();
-       local_bh_count(cpu)--;
-}
-
-
-#define local_bh_disable()     cpu_bh_disable(smp_processor_id())
-#define __local_bh_enable()    __cpu_bh_enable(smp_processor_id())
-#define local_bh_enable()                                      \
-do {                                                           \
-       int cpu;                                                \
-                                                               \
-       barrier();                                              \
-       cpu = smp_processor_id();                               \
-       if (!--local_bh_count(cpu) && softirq_pending(cpu))     \
-               do_softirq();                                   \
-} while (0)
-
-#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
-
-#define __cpu_raise_softirq(cpu, nr)   set_bit(nr, &softirq_pending(cpu))
-
-#endif /* _ASM_SOFTIRQ_H */
diff --git a/include/asm-mips64/softirq.h b/include/asm-mips64/softirq.h
deleted file mode 100644 (file)
index 9d070a7..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1997, 1998, 1999, 2000, 2001 by Ralf Baechle
- * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
- * Copyright (C) 2001 MIPS Technologies, Inc.
- */
-#ifndef _ASM_SOFTIRQ_H
-#define _ASM_SOFTIRQ_H
-
-#include <asm/atomic.h>
-#include <asm/hardirq.h>
-
-extern inline void cpu_bh_disable(int cpu)
-{
-       local_bh_count(cpu)++;
-       barrier();
-}
-extern inline void __cpu_bh_enable(int cpu)
-{
-       barrier();
-       local_bh_count(cpu)--;
-}
-
-#define local_bh_disable()     cpu_bh_disable(smp_processor_id())
-#define __local_bh_enable()    __cpu_bh_enable(smp_processor_id())
-#define local_bh_enable()                                      \
-do {                                                           \
-       int cpu;                                                \
-                                                               \
-       barrier();                                              \
-       cpu = smp_processor_id();                               \
-       if (!--local_bh_count(cpu) && softirq_pending(cpu))     \
-               do_softirq();                                   \
-} while (0)
-
-#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
-
-extern inline void __cpu_raise_softirq(int cpu, int nr)
-{
-       unsigned int *m = (unsigned int *) &softirq_pending(cpu);
-       unsigned int temp;
-
-       __asm__ __volatile__(
-               "1:\tll\t%0, %1\t\t\t# __cpu_raise_softirq\n\t"
-               "or\t%0, %2\n\t"
-               "sc\t%0, %1\n\t"
-               "beqz\t%0, 1b"
-               : "=&r" (temp), "=m" (*m)
-               : "ir" (1UL << nr), "m" (*m)
-               : "memory");
-}
-
-#endif /* _ASM_SOFTIRQ_H */
diff --git a/include/asm-parisc/softirq.h b/include/asm-parisc/softirq.h
deleted file mode 100644 (file)
index 8bf7c12..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __ASM_SOFTIRQ_H
-#define __ASM_SOFTIRQ_H
-
-#include <asm/atomic.h>
-#include <asm/hardirq.h>
-
-#define local_bh_disable() \
-               do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
-#define __local_bh_enable() \
-               do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
-
-#define local_bh_enable()                                              \
-do {                                                                   \
-       __local_bh_enable();                                            \
-       if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \
-               do_softirq();                                           \
-       preempt_check_resched();                                        \
-} while (0)
-
-#endif /* __ASM_SOFTIRQ_H */
diff --git a/include/asm-ppc/softirq.h b/include/asm-ppc/softirq.h
deleted file mode 100644 (file)
index 79ccd5d..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifdef __KERNEL__
-#ifndef __ASM_SOFTIRQ_H
-#define __ASM_SOFTIRQ_H
-
-#include <linux/preempt.h>
-#include <asm/hardirq.h>
-
-#define local_bh_disable()                     \
-do {                                           \
-       preempt_count() += SOFTIRQ_OFFSET;      \
-       barrier();                              \
-} while (0)
-
-#define __local_bh_enable()                    \
-do {                                           \
-       barrier();                              \
-       preempt_count() -= SOFTIRQ_OFFSET;      \
-} while (0)
-
-#define local_bh_enable()                                      \
-do {                                                           \
-       __local_bh_enable();                                    \
-       if (unlikely(!in_interrupt()                            \
-                    && softirq_pending(smp_processor_id())))   \
-               do_softirq();                                   \
-       if (preempt_count() == 0)                               \
-               preempt_check_resched();                        \
-} while (0)
-
-#endif /* __ASM_SOFTIRQ_H */
-#endif /* __KERNEL__ */
diff --git a/include/asm-ppc64/softirq.h b/include/asm-ppc64/softirq.h
deleted file mode 100644 (file)
index 33c0768..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef __ASM_SOFTIRQ_H
-#define __ASM_SOFTIRQ_H
-
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-#include <linux/preempt.h>
-#include <asm/hardirq.h>
-
-#define local_bh_disable() \
-               do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
-#define __local_bh_enable() \
-               do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
-
-#define local_bh_enable()                                              \
-do {                                                                   \
-       __local_bh_enable();                                            \
-       if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \
-               do_softirq();                                           \
-       preempt_check_resched();                                        \
-} while (0)
-
-#endif /* __ASM_SOFTIRQ_H */
diff --git a/include/asm-s390/softirq.h b/include/asm-s390/softirq.h
deleted file mode 100644 (file)
index 91f9853..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *  include/asm-s390/softirq.h
- *
- *  S390 version
- *
- *  Derived from "include/asm-i386/softirq.h"
- */
-
-#ifndef __ASM_SOFTIRQ_H
-#define __ASM_SOFTIRQ_H
-
-#include <linux/smp.h>
-#include <linux/preempt.h>
-
-#include <asm/atomic.h>
-#include <asm/hardirq.h>
-#include <asm/lowcore.h>
-
-#define local_bh_disable() \
-               do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
-#define __local_bh_enable() \
-               do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
-
-extern void do_call_softirq(void);
-
-#define local_bh_enable()                                              \
-do {                                                                   \
-       __local_bh_enable();                                            \
-       if (!in_interrupt() && softirq_pending(smp_processor_id()))     \
-               /* Use the async. stack for softirq */                  \
-               do_call_softirq();                                      \
-       preempt_check_resched();                                        \
-} while (0)
-
-#endif /* __ASM_SOFTIRQ_H */
-
-
-
-
-
-
-
diff --git a/include/asm-s390x/softirq.h b/include/asm-s390x/softirq.h
deleted file mode 100644 (file)
index 91f9853..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *  include/asm-s390/softirq.h
- *
- *  S390 version
- *
- *  Derived from "include/asm-i386/softirq.h"
- */
-
-#ifndef __ASM_SOFTIRQ_H
-#define __ASM_SOFTIRQ_H
-
-#include <linux/smp.h>
-#include <linux/preempt.h>
-
-#include <asm/atomic.h>
-#include <asm/hardirq.h>
-#include <asm/lowcore.h>
-
-#define local_bh_disable() \
-               do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
-#define __local_bh_enable() \
-               do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
-
-extern void do_call_softirq(void);
-
-#define local_bh_enable()                                              \
-do {                                                                   \
-       __local_bh_enable();                                            \
-       if (!in_interrupt() && softirq_pending(smp_processor_id()))     \
-               /* Use the async. stack for softirq */                  \
-               do_call_softirq();                                      \
-       preempt_check_resched();                                        \
-} while (0)
-
-#endif /* __ASM_SOFTIRQ_H */
-
-
-
-
-
-
-
diff --git a/include/asm-sh/softirq.h b/include/asm-sh/softirq.h
deleted file mode 100644 (file)
index 1c4229e..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef __ASM_SH_SOFTIRQ_H
-#define __ASM_SH_SOFTIRQ_H
-
-#include <asm/atomic.h>
-#include <asm/hardirq.h>
-
-#define local_bh_disable()                     \
-do {                                           \
-       local_bh_count(smp_processor_id())++;   \
-       barrier();                              \
-} while (0)
-
-#define __local_bh_enable()                    \
-do {                                           \
-       barrier();                              \
-       local_bh_count(smp_processor_id())--;   \
-} while (0)
-
-#define local_bh_enable()                              \
-do {                                                   \
-       barrier();                                      \
-       if (!--local_bh_count(smp_processor_id())       \
-           && softirq_pending(smp_processor_id())) {   \
-               do_softirq();                           \
-       }                                               \
-} while (0)
-
-#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
-
-#endif /* __ASM_SH_SOFTIRQ_H */
diff --git a/include/asm-sparc/softirq.h b/include/asm-sparc/softirq.h
deleted file mode 100644 (file)
index e9f7d10..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* softirq.h: 32-bit Sparc soft IRQ support.
- *
- * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
- * Copyright (C) 1998-99 Anton Blanchard (anton@progsoc.uts.edu.au)
- */
-
-#ifndef __SPARC_SOFTIRQ_H
-#define __SPARC_SOFTIRQ_H
-
-// #include <linux/threads.h>  /* For NR_CPUS */
-
-// #include <asm/atomic.h>
-#include <asm/smp.h>
-#include <asm/hardirq.h>
-
-#define local_bh_disable() \
-               do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
-#define __local_bh_enable() \
-               do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
-
-#define local_bh_enable()                        \
-do {                                           \
-       __local_bh_enable();                    \
-       if (!in_interrupt() &&                  \
-        softirq_pending(smp_processor_id())) {   \
-               do_softirq();                     \
-     }                                           \
-       preempt_check_resched();                  \
-} while (0)
-
-#endif /* __SPARC_SOFTIRQ_H */
diff --git a/include/asm-sparc64/softirq.h b/include/asm-sparc64/softirq.h
deleted file mode 100644 (file)
index 80e625e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* softirq.h: 64-bit Sparc soft IRQ support.
- *
- * Copyright (C) 1997, 1998 David S. Miller (davem@caip.rutgers.edu)
- */
-
-#ifndef __SPARC64_SOFTIRQ_H
-#define __SPARC64_SOFTIRQ_H
-
-#include <linux/preempt.h>
-#include <asm/hardirq.h>
-#include <asm/system.h>                /* for membar() */
-
-#define local_bh_disable()     \
-       do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
-#define __local_bh_enable()    \
-       do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
-#define local_bh_enable()                              \
-do {   __local_bh_enable();                            \
-       if (unlikely(!in_interrupt() &&                 \
-           softirq_pending(smp_processor_id())))       \
-               do_softirq();                           \
-       preempt_check_resched();                        \
-} while (0)
-
-#endif /* !(__SPARC64_SOFTIRQ_H) */
diff --git a/include/asm-um/softirq.h b/include/asm-um/softirq.h
deleted file mode 100644 (file)
index 41734a0..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef __UM_SOFTIRQ_H
-#define __UM_SOFTIRQ_H
-
-#include "linux/smp.h"
-#include "asm/system.h"
-#include "asm/processor.h"
-
-/* A gratuitous name change */
-#define i386_bh_lock um_bh_lock
-#include "asm/arch/softirq.h"
-#undef i386_bh_lock
-
-#endif
diff --git a/include/asm-v850/softirq.h b/include/asm-v850/softirq.h
deleted file mode 100644 (file)
index 6d514c7..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __V850_SOFTIRQ_H__
-#define __V850_SOFTIRQ_H__
-
-#include <linux/preempt.h>
-#include <asm/hardirq.h>
-
-#define local_bh_disable() \
-               do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
-#define __local_bh_enable() \
-               do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
-
-#define local_bh_enable()                                              \
-do {                                                                   \
-       __local_bh_enable();                                            \
-       if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \
-               do_softirq();                                           \
-       preempt_check_resched();                                        \
-} while (0)
-
-#endif /* __V850_SOFTIRQ_H__ */
diff --git a/include/asm-x86_64/softirq.h b/include/asm-x86_64/softirq.h
deleted file mode 100644 (file)
index 436bdc8..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef __ASM_SOFTIRQ_H
-#define __ASM_SOFTIRQ_H
-
-#include <linux/preempt.h>
-#include <asm/hardirq.h>
-
-#define local_bh_disable() \
-               do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
-#define __local_bh_enable() \
-               do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
-
-void do_softirq(void);
-
-#define local_bh_enable()                                              \
-do {                                                                   \
-       __local_bh_enable();                                            \
-       if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \
-               do_softirq();                                           \
-       preempt_check_resched();                                        \
-} while (0)
-               
-#endif /* __ASM_SOFTIRQ_H */
index 7a0681b9e8802e63fbf6df19d6c7fbf2704b7dc1..e71f89ae8b3f842b775d05b6d3d6ee00e6875f19 100644 (file)
@@ -8,7 +8,6 @@
 #include <asm/atomic.h>
 #include <asm/hardirq.h>
 #include <asm/ptrace.h>
-#include <asm/softirq.h>
 #include <asm/system.h>
 
 struct irqaction {
@@ -36,6 +35,13 @@ extern void free_irq(unsigned int, void *);
 # define save_and_cli(x)       local_irq_save(x)
 #endif
 
+/* SoftIRQ primitives.  */
+#define local_bh_disable() \
+               do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
+#define __local_bh_enable() \
+               do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
+
+extern void local_bh_enable(void);
 
 /* PLEASE, avoid to allocate new softirqs, if you need not _really_ high
    frequency threaded job scheduling. For almost all the purposes
index e5ddc3d408f85355abafdca7e93a3a9ac05ff057..19e6d2f849d551dc5ecf62f0736394ffae9bbc54 100644 (file)
@@ -194,7 +194,6 @@ static inline int try_inc_mod_count(struct module *mod)
 #define spin_unlock_bh(lock) do {spin_unlock(lock);end_bh_atomic();} while(0)
 #else
 #include <linux/interrupt.h>
-#include <asm/softirq.h>
 #include <linux/spinlock.h>
 #endif
 
index f9d76d9f06b6c91f4c6a8f80fe5dd46ee313e3a8..77ee098739e15361b4ecc0c405b63c7aa9922283 100644 (file)
@@ -6,6 +6,7 @@
  * Rewritten. Old one was good in 2.2, but in 2.3 it was immoral. --ANK (990903)
  */
 
+#include <linux/module.h>
 #include <linux/kernel_stat.h>
 #include <linux/interrupt.h>
 #include <linux/notifier.h>
@@ -100,6 +101,17 @@ restart:
        local_irq_restore(flags);
 }
 
+void local_bh_enable(void)
+{
+       __local_bh_enable();
+       BUG_ON(irqs_disabled());
+       if (unlikely(!in_interrupt() &&
+                    softirq_pending(smp_processor_id())))
+               do_softirq();
+       preempt_check_resched();
+}
+EXPORT_SYMBOL(local_bh_enable);
+
 /*
  * This function must run with irqs disabled!
  */