summaryrefslogtreecommitdiffstats
path: root/include/linux/irqflags.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2006-11-26 16:27:17 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-11-26 16:27:17 -0800
commitb8e6ec865fd1d8838b6ce9516977b65e9f08f876 (patch)
tree9203493fc47d1ff55bee5c2a68884215257ad0bf /include/linux/irqflags.h
parent137b529e4df7b9cd6b235654a3f1a8f280e3463d (diff)
Revert "[PATCH] Enforce "unsigned long flags;" when spinlocking"
This reverts commit ee3ce191e8eaa4cc15c51a28b34143b36404c4f5, since it broke on at least ARM, MIPS and PA-RISC due to complicated header file dependencies. Conflicts in include/linux/spinlock.h (due to the "nested" variety fixes) fixed up by hand. Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Kyle McMartin <kyle@parisc-linux.org> Cc: Russell King <rmk+lkml@arm.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/irqflags.h')
-rw-r--r--include/linux/irqflags.h37
1 files changed, 5 insertions, 32 deletions
diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h
index 4fe740bf4ea..412e025bc5c 100644
--- a/include/linux/irqflags.h
+++ b/include/linux/irqflags.h
@@ -11,12 +11,6 @@
#ifndef _LINUX_TRACE_IRQFLAGS_H
#define _LINUX_TRACE_IRQFLAGS_H
-#define BUILD_CHECK_IRQ_FLAGS(flags) \
- do { \
- BUILD_BUG_ON(sizeof(flags) != sizeof(unsigned long)); \
- typecheck(unsigned long, flags); \
- } while (0)
-
#ifdef CONFIG_TRACE_IRQFLAGS
extern void trace_hardirqs_on(void);
extern void trace_hardirqs_off(void);
@@ -56,15 +50,10 @@
#define local_irq_disable() \
do { raw_local_irq_disable(); trace_hardirqs_off(); } while (0)
#define local_irq_save(flags) \
- do { \
- BUILD_CHECK_IRQ_FLAGS(flags); \
- raw_local_irq_save(flags); \
- trace_hardirqs_off(); \
- } while (0)
+ do { raw_local_irq_save(flags); trace_hardirqs_off(); } while (0)
#define local_irq_restore(flags) \
do { \
- BUILD_CHECK_IRQ_FLAGS(flags); \
if (raw_irqs_disabled_flags(flags)) { \
raw_local_irq_restore(flags); \
trace_hardirqs_off(); \
@@ -80,16 +69,8 @@
*/
# define raw_local_irq_disable() local_irq_disable()
# define raw_local_irq_enable() local_irq_enable()
-# define raw_local_irq_save(flags) \
- do { \
- BUILD_CHECK_IRQ_FLAGS(flags); \
- local_irq_save(flags); \
- } while (0)
-# define raw_local_irq_restore(flags) \
- do { \
- BUILD_CHECK_IRQ_FLAGS(flags); \
- local_irq_restore(flags); \
- } while (0)
+# define raw_local_irq_save(flags) local_irq_save(flags)
+# define raw_local_irq_restore(flags) local_irq_restore(flags)
#endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */
#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
@@ -99,11 +80,7 @@
raw_safe_halt(); \
} while (0)
-#define local_save_flags(flags) \
- do { \
- BUILD_CHECK_IRQ_FLAGS(flags); \
- raw_local_save_flags(flags); \
- } while (0)
+#define local_save_flags(flags) raw_local_save_flags(flags)
#define irqs_disabled() \
({ \
@@ -113,11 +90,7 @@
raw_irqs_disabled_flags(flags); \
})
-#define irqs_disabled_flags(flags) \
-({ \
- BUILD_CHECK_IRQ_FLAGS(flags); \
- raw_irqs_disabled_flags(flags); \
-})
+#define irqs_disabled_flags(flags) raw_irqs_disabled_flags(flags)
#endif /* CONFIG_X86 */
#endif