summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/hardirq.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-04-29 21:13:14 +0000
committer <ralf@linux-mips.org>1997-04-29 21:13:14 +0000
commit19c9bba94152148523ba0f7ef7cffe3d45656b11 (patch)
tree40b1cb534496a7f1ca0f5c314a523c69f1fee464 /include/asm-sparc64/hardirq.h
parent7206675c40394c78a90e74812bbdbf8cf3cca1be (diff)
Import of Linux/MIPS 2.1.36
Diffstat (limited to 'include/asm-sparc64/hardirq.h')
-rw-r--r--include/asm-sparc64/hardirq.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/asm-sparc64/hardirq.h b/include/asm-sparc64/hardirq.h
new file mode 100644
index 000000000..b7cd278e7
--- /dev/null
+++ b/include/asm-sparc64/hardirq.h
@@ -0,0 +1,29 @@
+/* hardirq.h: 64-bit Sparc hard IRQ support.
+ *
+ * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
+ */
+
+#ifndef __SPARC64_HARDIRQ_H
+#define __SPARC64_HARDIRQ_H
+
+#include <linux/tasks.h>
+
+extern unsigned int local_irq_count[NR_CPUS];
+#define in_interrupt() (local_irq_count[smp_processor_id()] != 0)
+#define hardirq_depth() (local_irq_count[smp_processor_id()])
+
+#ifdef __SMP__
+#error SMP not supported on sparc64
+#else /* !(__SMP__) */
+
+#define hardirq_trylock(cpu) (++local_irq_count[cpu], (cpu)==0)
+#define hardirq_endlock(cpu) (--local_irq_count[cpu])
+
+#define hardirq_enter(cpu) (local_irq_count[cpu]++)
+#define hardirq_exit(cpu) (local_irq_count[cpu]--)
+
+#define synchronize_irq() do { } while(0)
+
+#endif /* __SMP__ */
+
+#endif /* !(__SPARC64_HARDIRQ_H) */