diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-06-17 13:25:08 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-06-17 13:25:08 +0000 |
commit | 59223edaa18759982db0a8aced0e77457d10c68e (patch) | |
tree | 89354903b01fa0a447bffeefe00df3044495db2e /include/asm-sparc/softirq.h | |
parent | db7d4daea91e105e3859cf461d7e53b9b77454b2 (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.h | 9 |
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 |