aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irqflags.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2006-11-26 19:27:17 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-11-26 19:27:17 -0500
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 4fe740bf4eae..412e025bc5c7 100644
--- a/include/linux/irqflags.h
+++ b/include/linux/irqflags.h
@@ -11,12 +11,6 @@
11#ifndef _LINUX_TRACE_IRQFLAGS_H 11#ifndef _LINUX_TRACE_IRQFLAGS_H
12#define _LINUX_TRACE_IRQFLAGS_H 12#define _LINUX_TRACE_IRQFLAGS_H
13 13
14#define BUILD_CHECK_IRQ_FLAGS(flags) \
15 do { \
16 BUILD_BUG_ON(sizeof(flags) != sizeof(unsigned long)); \
17 typecheck(unsigned long, flags); \
18 } while (0)
19
20#ifdef CONFIG_TRACE_IRQFLAGS 14#ifdef CONFIG_TRACE_IRQFLAGS
21 extern void trace_hardirqs_on(void); 15 extern void trace_hardirqs_on(void);
22 extern void trace_hardirqs_off(void); 16 extern void trace_hardirqs_off(void);
@@ -56,15 +50,10 @@
56#define local_irq_disable() \ 50#define local_irq_disable() \
57 do { raw_local_irq_disable(); trace_hardirqs_off(); } while (0) 51 do { raw_local_irq_disable(); trace_hardirqs_off(); } while (0)
58#define local_irq_save(flags) \ 52#define local_irq_save(flags) \
59 do { \ 53 do { raw_local_irq_save(flags); trace_hardirqs_off(); } while (0)
60 BUILD_CHECK_IRQ_FLAGS(flags); \
61 raw_local_irq_save(flags); \
62 trace_hardirqs_off(); \
63 } while (0)
64 54
65#define local_irq_restore(flags) \ 55#define local_irq_restore(flags) \
66 do { \ 56 do { \
67 BUILD_CHECK_IRQ_FLAGS(flags); \
68 if (raw_irqs_disabled_flags(flags)) { \ 57 if (raw_irqs_disabled_flags(flags)) { \
69 raw_local_irq_restore(flags); \ 58 raw_local_irq_restore(flags); \
70 trace_hardirqs_off(); \ 59 trace_hardirqs_off(); \
@@ -80,16 +69,8 @@
80 */ 69 */
81# define raw_local_irq_disable() local_irq_disable() 70# define raw_local_irq_disable() local_irq_disable()
82# define raw_local_irq_enable() local_irq_enable() 71# define raw_local_irq_enable() local_irq_enable()
83# define raw_local_irq_save(flags) \ 72# define raw_local_irq_save(flags) local_irq_save(flags)
84 do { \ 73# define raw_local_irq_restore(flags) local_irq_restore(flags)
85 BUILD_CHECK_IRQ_FLAGS(flags); \
86 local_irq_save(flags); \
87 } while (0)
88# define raw_local_irq_restore(flags) \
89 do { \
90 BUILD_CHECK_IRQ_FLAGS(flags); \
91 local_irq_restore(flags); \
92 } while (0)
93#endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */ 74#endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */
94 75
95#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT 76#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
@@ -99,11 +80,7 @@
99 raw_safe_halt(); \ 80 raw_safe_halt(); \
100 } while (0) 81 } while (0)
101 82
102#define local_save_flags(flags) \ 83#define local_save_flags(flags) raw_local_save_flags(flags)
103 do { \
104 BUILD_CHECK_IRQ_FLAGS(flags); \
105 raw_local_save_flags(flags); \
106 } while (0)
107 84
108#define irqs_disabled() \ 85#define irqs_disabled() \
109({ \ 86({ \
@@ -113,11 +90,7 @@
113 raw_irqs_disabled_flags(flags); \ 90 raw_irqs_disabled_flags(flags); \
114}) 91})
115 92
116#define irqs_disabled_flags(flags) \ 93#define irqs_disabled_flags(flags) raw_irqs_disabled_flags(flags)
117({ \
118 BUILD_CHECK_IRQ_FLAGS(flags); \
119 raw_irqs_disabled_flags(flags); \
120})
121#endif /* CONFIG_X86 */ 94#endif /* CONFIG_X86 */
122 95
123#endif 96#endif