summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2004-11-07 03:39:48 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-11-07 03:39:48 -0800
commit2252004fae9b12f1e326a1bb932ed9babb4ba5c7 (patch)
tree51048ba401a0745a266320020c0b14d75fced275 /include/linux
parent2c86490e25482c32acec0a1b2dae2fb76921ab53 (diff)
[PATCH] more hardirq.h consolidation
PREEMPT_BITS, SOFTIRQ_BITS, PREEMPT_SHIFT, SOFTIRQ_SHIFT and HARDIRQ_SHIFT are the same for all architectures (and chaning them in future ports doesn't make a lot of sense), so move them to <linux/hardirq.h>. Make the HARDIRQ_BITS definition guarded by #ifndef HARDIRQ_BITS instead of CONFIG_GENERIC_HARDIRQS so we have a saner way to override it once ports with lots of irq sources are changed to use the generic hardirq framework. Ingo, maybe we should change the default for it back to 8 as that's what most ports use? Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/hardirq.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
index 7969257bc87a..eae45cc3ea7a 100644
--- a/include/linux/hardirq.h
+++ b/include/linux/hardirq.h
@@ -5,39 +5,39 @@
#include <linux/smp_lock.h>
#include <asm/hardirq.h>
-#ifdef CONFIG_GENERIC_HARDIRQS
/*
* We put the hardirq and softirq counter into the preemption
* counter. The bitmask has the following meaning:
*
* - bits 0-7 are the preemption count (max preemption depth: 256)
* - bits 8-15 are the softirq count (max # of softirqs: 256)
- * - bits 16-27 are the hardirq count (max # of hardirqs: 4096)
*
+ * The hardirq count can be overridden per architecture, the default is:
+ *
+ * - bits 16-27 are the hardirq count (max # of hardirqs: 4096)
* - ( bit 28 is the PREEMPT_ACTIVE flag. )
*
* PREEMPT_MASK: 0x000000ff
* SOFTIRQ_MASK: 0x0000ff00
* HARDIRQ_MASK: 0x0fff0000
*/
-
#define PREEMPT_BITS 8
#define SOFTIRQ_BITS 8
-#define HARDIRQ_BITS 12
-
-#define PREEMPT_SHIFT 0
-#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
-#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
+#ifndef HARDIRQ_BITS
+#define HARDIRQ_BITS 12
/*
- * The hardirq mask has to be large enough to have
- * space for potentially all IRQ sources in the system
- * nesting on a single CPU:
+ * The hardirq mask has to be large enough to have space for potentially
+ * all IRQ sources in the system nesting on a single CPU.
*/
#if (1 << HARDIRQ_BITS) < NR_IRQS
# error HARDIRQ_BITS is too low!
#endif
-#endif /* CONFIG_GENERIC_HARDIRQS */
+#endif
+
+#define PREEMPT_SHIFT 0
+#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
+#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __IRQ_MASK(x) ((1UL << (x))-1)