patch-2.4.0-test6 linux/include/asm-m68k/hardirq.h
Next file: linux/include/asm-m68k/page.h
Previous file: linux/include/asm-ia64/system.h
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Fri Aug 4 16:15:37 2000
- Orig file:
v2.4.0-test5/linux/include/asm-m68k/hardirq.h
- Orig date:
Sun Feb 13 19:29:04 2000
diff -u --recursive --new-file v2.4.0-test5/linux/include/asm-m68k/hardirq.h linux/include/asm-m68k/hardirq.h
@@ -3,17 +3,26 @@
#include <linux/threads.h>
-extern unsigned int local_irq_count[NR_CPUS];
+/* entry.S is sensitive to the offsets of these fields */
+typedef struct {
+ unsigned int __softirq_active;
+ unsigned int __softirq_mask;
+ unsigned int __local_irq_count;
+ unsigned int __local_bh_count;
+ unsigned int __syscall_count;
+} ____cacheline_aligned irq_cpustat_t;
-#define in_interrupt() (local_irq_count[smp_processor_id()] + local_bh_count[smp_processor_id()] != 0)
+#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
-#define in_irq() (local_irq_count[smp_processor_id()] != 0)
+#define in_interrupt() (local_irq_count(smp_processor_id()) + local_bh_count(smp_processor_id()) != 0)
-#define hardirq_trylock(cpu) (local_irq_count[cpu] == 0)
+#define in_irq() (local_irq_count(smp_processor_id()) != 0)
+
+#define hardirq_trylock(cpu) (local_irq_count(cpu) == 0)
#define hardirq_endlock(cpu) do { } while (0)
-#define irq_enter(cpu) (local_irq_count[cpu]++)
-#define irq_exit(cpu) (local_irq_count[cpu]--)
+#define irq_enter(cpu) (local_irq_count(cpu)++)
+#define irq_exit(cpu) (local_irq_count(cpu)--)
#define synchronize_irq() barrier()
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)