summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc/softirq.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-06-17 13:25:08 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-06-17 13:25:08 +0000
commit59223edaa18759982db0a8aced0e77457d10c68e (patch)
tree89354903b01fa0a447bffeefe00df3044495db2e /include/asm-sparc/softirq.h
parentdb7d4daea91e105e3859cf461d7e53b9b77454b2 (diff)
Merge with Linux 2.3.6. Sorry, this isn't tested on silicon, I don't
have a MIPS box at hand.
Diffstat (limited to 'include/asm-sparc/softirq.h')
-rw-r--r--include/asm-sparc/softirq.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/asm-sparc/softirq.h b/include/asm-sparc/softirq.h
index 4920aa865..e72d714cb 100644
--- a/include/asm-sparc/softirq.h
+++ b/include/asm-sparc/softirq.h
@@ -103,7 +103,8 @@ static inline void end_bh_atomic(void)
static inline int softirq_trylock(int cpu)
{
if (spin_trylock(&global_bh_count)) {
- if (atomic_read(&global_bh_lock) == 0) {
+ if (atomic_read(&global_bh_lock) == 0 &&
+ local_bh_count[cpu] == 0) {
++local_bh_count[cpu];
return 1;
}
@@ -118,6 +119,9 @@ static inline void softirq_endlock(int cpu)
spin_unlock(&global_bh_count);
}
+#define local_bh_disable() (local_bh_count[smp_processor_id()]++)
+#define local_bh_enable() (local_bh_count[smp_processor_id()]--)
+
#else
extern unsigned int local_bh_count;
@@ -129,6 +133,9 @@ extern unsigned int local_bh_count;
#define softirq_endlock(cpu) (local_bh_count = 0)
#define synchronize_bh() barrier()
+#define local_bh_disable() (local_bh_count++)
+#define local_bh_enable() (local_bh_count--)
+
/*
* These use a mask count to correctly handle
* nested disable/enable calls