aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irqflags.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/irqflags.h')
-rw-r--r--include/linux/irqflags.h43
1 files changed, 22 insertions, 21 deletions
diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h
index d176d658fe25..5dd1272d1ab2 100644
--- a/include/linux/irqflags.h
+++ b/include/linux/irqflags.h
@@ -85,7 +85,7 @@
85 * The local_irq_*() APIs are equal to the raw_local_irq*() 85 * The local_irq_*() APIs are equal to the raw_local_irq*()
86 * if !TRACE_IRQFLAGS. 86 * if !TRACE_IRQFLAGS.
87 */ 87 */
88#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT 88#ifdef CONFIG_TRACE_IRQFLAGS
89#define local_irq_enable() \ 89#define local_irq_enable() \
90 do { trace_hardirqs_on(); raw_local_irq_enable(); } while (0) 90 do { trace_hardirqs_on(); raw_local_irq_enable(); } while (0)
91#define local_irq_disable() \ 91#define local_irq_disable() \
@@ -107,22 +107,6 @@
107 raw_local_irq_restore(flags); \ 107 raw_local_irq_restore(flags); \
108 } \ 108 } \
109 } while (0) 109 } while (0)
110#define local_save_flags(flags) \
111 do { \
112 raw_local_save_flags(flags); \
113 } while (0)
114
115#define irqs_disabled_flags(flags) \
116 ({ \
117 raw_irqs_disabled_flags(flags); \
118 })
119
120#define irqs_disabled() \
121 ({ \
122 unsigned long _flags; \
123 raw_local_save_flags(_flags); \
124 raw_irqs_disabled_flags(_flags); \
125 })
126 110
127#define safe_halt() \ 111#define safe_halt() \
128 do { \ 112 do { \
@@ -131,7 +115,7 @@
131 } while (0) 115 } while (0)
132 116
133 117
134#else /* !CONFIG_TRACE_IRQFLAGS_SUPPORT */ 118#else /* !CONFIG_TRACE_IRQFLAGS */
135 119
136#define local_irq_enable() do { raw_local_irq_enable(); } while (0) 120#define local_irq_enable() do { raw_local_irq_enable(); } while (0)
137#define local_irq_disable() do { raw_local_irq_disable(); } while (0) 121#define local_irq_disable() do { raw_local_irq_disable(); } while (0)
@@ -140,11 +124,28 @@
140 raw_local_irq_save(flags); \ 124 raw_local_irq_save(flags); \
141 } while (0) 125 } while (0)
142#define local_irq_restore(flags) do { raw_local_irq_restore(flags); } while (0) 126#define local_irq_restore(flags) do { raw_local_irq_restore(flags); } while (0)
143#define local_save_flags(flags) do { raw_local_save_flags(flags); } while (0)
144#define irqs_disabled() (raw_irqs_disabled())
145#define irqs_disabled_flags(flags) (raw_irqs_disabled_flags(flags))
146#define safe_halt() do { raw_safe_halt(); } while (0) 127#define safe_halt() do { raw_safe_halt(); } while (0)
147 128
129#endif /* CONFIG_TRACE_IRQFLAGS */
130
131#define local_save_flags(flags) raw_local_save_flags(flags)
132
133/*
134 * Some architectures don't define arch_irqs_disabled(), so even if either
135 * definition would be fine we need to use different ones for the time being
136 * to avoid build issues.
137 */
138#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
139#define irqs_disabled() \
140 ({ \
141 unsigned long _flags; \
142 raw_local_save_flags(_flags); \
143 raw_irqs_disabled_flags(_flags); \
144 })
145#else /* !CONFIG_TRACE_IRQFLAGS_SUPPORT */
146#define irqs_disabled() raw_irqs_disabled()
148#endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */ 147#endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */
149 148
149#define irqs_disabled_flags(flags) raw_irqs_disabled_flags(flags)
150
150#endif 151#endif