diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-08 02:59:00 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-08 02:59:00 +0000 |
commit | 1fcb7623bc138d780101d7a70cfe29b11f7c67ef (patch) | |
tree | e1ec9bb6aa19db16a405fb4393e2a90c38b4c75d /include/asm-sparc/hardirq.h | |
parent | 458fe58677afb17219d864e100131728038b4f1b (diff) |
Merge with Linux 2.4.0-test3-pre5. 64-bit kernel are still not
-Werror clean.
Diffstat (limited to 'include/asm-sparc/hardirq.h')
-rw-r--r-- | include/asm-sparc/hardirq.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/include/asm-sparc/hardirq.h b/include/asm-sparc/hardirq.h index c34312aa4..8b7b095ad 100644 --- a/include/asm-sparc/hardirq.h +++ b/include/asm-sparc/hardirq.h @@ -11,23 +11,24 @@ #include <linux/threads.h> #ifndef CONFIG_SMP -extern unsigned int local_irq_count; +extern unsigned int __local_irq_count; +#define local_irq_count(cpu) __local_irq_count /* * Are we in an interrupt context? Either doing bottom half * or hardware interrupt processing? */ -#define in_interrupt() ((local_irq_count + local_bh_count) != 0) +#define in_interrupt() ((__local_irq_count + __local_bh_count) != 0) -#define hardirq_trylock(cpu) ((void)(cpu), local_irq_count == 0) +#define hardirq_trylock(cpu) ((void)(cpu), __local_irq_count == 0) #define hardirq_endlock(cpu) do { (void)(cpu); } while (0) -#define hardirq_enter(cpu) (local_irq_count++) -#define hardirq_exit(cpu) (local_irq_count--) +#define hardirq_enter(cpu) (__local_irq_count++) +#define hardirq_exit(cpu) (__local_irq_count--) #define synchronize_irq() barrier() -#define in_irq() (local_irq_count != 0) +#define in_irq() (__local_irq_count != 0) #else @@ -36,7 +37,8 @@ extern unsigned int local_irq_count; #include <asm/system.h> #include <asm/smp.h> -extern unsigned int local_irq_count[NR_CPUS]; +extern unsigned int __local_irq_count[NR_CPUS]; +#define local_irq_count(cpu) __local_irq_count[cpu] extern unsigned char global_irq_holder; extern spinlock_t global_irq_lock; extern atomic_t global_irq_count; @@ -46,10 +48,10 @@ extern atomic_t global_irq_count; * or hardware interrupt processing? */ #define in_interrupt() ({ int __cpu = smp_processor_id(); \ - (local_irq_count[__cpu] + local_bh_count[__cpu] != 0); }) + (local_irq_count(__cpu) + local_bh_count(__cpu) != 0); }) #define in_irq() ({ int __cpu = smp_processor_id(); \ - (local_irq_count[__cpu] != 0); }) + (local_irq_count(__cpu) != 0); }) static inline void release_irqlock(int cpu) { @@ -62,14 +64,14 @@ static inline void release_irqlock(int cpu) static inline void hardirq_enter(int cpu) { - ++local_irq_count[cpu]; + ++local_irq_count(cpu); atomic_inc(&global_irq_count); } static inline void hardirq_exit(int cpu) { atomic_dec(&global_irq_count); - --local_irq_count[cpu]; + --local_irq_count(cpu); } static inline int hardirq_trylock(int cpu) |