diff options
author | kaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk> | 2004-06-16 21:29:21 +0000 |
---|---|---|
committer | kaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk> | 2004-06-16 21:29:21 +0000 |
commit | 4c6d37d5a2856376f2b16e41f3992629754a2969 (patch) | |
tree | 0016fce63e451de39255084b05d3b4d19cbec729 /xen/include/asm-x86/hardirq.h | |
parent | fc150e9f6d2ea4b9f9bf891857ba62cfb5d48182 (diff) | |
download | xen-4c6d37d5a2856376f2b16e41f3992629754a2969.tar.gz xen-4c6d37d5a2856376f2b16e41f3992629754a2969.tar.bz2 xen-4c6d37d5a2856376f2b16e41f3992629754a2969.zip |
bitkeeper revision 1.971 (40d0bbb1JPrSxn2RF8RhPvWOZBY1Sg)
More code excision.
Diffstat (limited to 'xen/include/asm-x86/hardirq.h')
-rw-r--r-- | xen/include/asm-x86/hardirq.h | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/xen/include/asm-x86/hardirq.h b/xen/include/asm-x86/hardirq.h index 5b3cb77c91..43a73f73c2 100644 --- a/xen/include/asm-x86/hardirq.h +++ b/xen/include/asm-x86/hardirq.h @@ -9,7 +9,6 @@ typedef struct { unsigned int __softirq_pending; unsigned int __local_irq_count; unsigned int __local_bh_count; - unsigned int __syscall_count; unsigned int __nmi_count; unsigned long idle_timestamp; } ____cacheline_aligned irq_cpustat_t; @@ -25,68 +24,7 @@ typedef struct { #define in_irq() (local_irq_count(smp_processor_id()) != 0) -#ifndef CONFIG_SMP - -#define hardirq_trylock(cpu) (local_irq_count(cpu) == 0) -#define hardirq_endlock(cpu) do { } while (0) - #define irq_enter(cpu, irq) (local_irq_count(cpu)++) #define irq_exit(cpu, irq) (local_irq_count(cpu)--) -#define synchronize_irq() barrier() - -#else - -#include <asm/atomic.h> -#include <asm/smp.h> - -extern unsigned char global_irq_holder; -extern unsigned volatile long global_irq_lock; /* long for set_bit -RR */ - -static inline int irqs_running (void) -{ - int i; - - for (i = 0; i < smp_num_cpus; i++) - if (local_irq_count(i)) - return 1; - return 0; -} - -static inline void release_irqlock(int cpu) -{ - /* if we didn't own the irq lock, just ignore.. */ - if (global_irq_holder == (unsigned char) cpu) { - global_irq_holder = NO_PROC_ID; - clear_bit(0,&global_irq_lock); - } -} - -static inline void irq_enter(int cpu, int irq) -{ - ++local_irq_count(cpu); - - smp_mb(); - - while (test_bit(0,&global_irq_lock)) { - cpu_relax(); - } -} - -static inline void irq_exit(int cpu, int irq) -{ - --local_irq_count(cpu); -} - -static inline int hardirq_trylock(int cpu) -{ - return !local_irq_count(cpu) && !test_bit(0,&global_irq_lock); -} - -#define hardirq_endlock(cpu) do { } while (0) - -extern void synchronize_irq(void); - -#endif /* CONFIG_SMP */ - #endif /* __ASM_HARDIRQ_H */ |