aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-03-28 08:10:52 -0400
committerThomas Gleixner <tglx@linutronix.de>2011-03-28 10:55:10 -0400
commit32f4125ebffee4f3c4dbc6a437fc656129eb9e60 (patch)
treed64c6bb7ba40c33734896303734416ea5b4f3290 /include
parentc2d0c555c22242c3a76e366074c4d83ef9fa3b8c (diff)
genirq: Move INPROGRESS, MASKED and DISABLED state flags to irq_data
We really need these flags for some of the interrupt chips. Move it from internal state to irq_data and provide proper accessors. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: David Daney <ddaney@caviumnetworks.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/irq.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index a10717e1c1f3..18aacccb0fae 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -174,8 +174,9 @@ struct irq_data {
174 * from suspend 174 * from suspend
175 * IRDQ_MOVE_PCNTXT - Interrupt can be moved in process 175 * IRDQ_MOVE_PCNTXT - Interrupt can be moved in process
176 * context 176 * context
177 * IRQD_IRQ_DISABLED - Some chip function need to know the 177 * IRQD_IRQ_DISABLED - Disabled state of the interrupt
178 * disabled state. 178 * IRQD_IRQ_MASKED - Masked state of the interrupt
179 * IRQD_IRQ_INPROGRESS - In progress state of the interrupt
179 */ 180 */
180enum { 181enum {
181 IRQD_TRIGGER_MASK = 0xf, 182 IRQD_TRIGGER_MASK = 0xf,
@@ -187,6 +188,8 @@ enum {
187 IRQD_WAKEUP_STATE = (1 << 14), 188 IRQD_WAKEUP_STATE = (1 << 14),
188 IRQD_MOVE_PCNTXT = (1 << 15), 189 IRQD_MOVE_PCNTXT = (1 << 15),
189 IRQD_IRQ_DISABLED = (1 << 16), 190 IRQD_IRQ_DISABLED = (1 << 16),
191 IRQD_IRQ_MASKED = (1 << 17),
192 IRQD_IRQ_INPROGRESS = (1 << 18),
190}; 193};
191 194
192static inline bool irqd_is_setaffinity_pending(struct irq_data *d) 195static inline bool irqd_is_setaffinity_pending(struct irq_data *d)
@@ -243,6 +246,16 @@ static inline bool irqd_irq_disabled(struct irq_data *d)
243 return d->state_use_accessors & IRQD_IRQ_DISABLED; 246 return d->state_use_accessors & IRQD_IRQ_DISABLED;
244} 247}
245 248
249static inline bool irqd_irq_masked(struct irq_data *d)
250{
251 return d->state_use_accessors & IRQD_IRQ_MASKED;
252}
253
254static inline bool irqd_irq_inprogress(struct irq_data *d)
255{
256 return d->state_use_accessors & IRQD_IRQ_INPROGRESS;
257}
258
246/** 259/**
247 * struct irq_chip - hardware interrupt chip descriptor 260 * struct irq_chip - hardware interrupt chip descriptor
248 * 261 *