From 32f4125ebffee4f3c4dbc6a437fc656129eb9e60 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 28 Mar 2011 14:10:52 +0200 Subject: 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 Cc: David Daney --- include/linux/irq.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'include/linux/irq.h') 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 { * from suspend * IRDQ_MOVE_PCNTXT - Interrupt can be moved in process * context - * IRQD_IRQ_DISABLED - Some chip function need to know the - * disabled state. + * IRQD_IRQ_DISABLED - Disabled state of the interrupt + * IRQD_IRQ_MASKED - Masked state of the interrupt + * IRQD_IRQ_INPROGRESS - In progress state of the interrupt */ enum { IRQD_TRIGGER_MASK = 0xf, @@ -187,6 +188,8 @@ enum { IRQD_WAKEUP_STATE = (1 << 14), IRQD_MOVE_PCNTXT = (1 << 15), IRQD_IRQ_DISABLED = (1 << 16), + IRQD_IRQ_MASKED = (1 << 17), + IRQD_IRQ_INPROGRESS = (1 << 18), }; static inline bool irqd_is_setaffinity_pending(struct irq_data *d) @@ -243,6 +246,16 @@ static inline bool irqd_irq_disabled(struct irq_data *d) return d->state_use_accessors & IRQD_IRQ_DISABLED; } +static inline bool irqd_irq_masked(struct irq_data *d) +{ + return d->state_use_accessors & IRQD_IRQ_MASKED; +} + +static inline bool irqd_irq_inprogress(struct irq_data *d) +{ + return d->state_use_accessors & IRQD_IRQ_INPROGRESS; +} + /** * struct irq_chip - hardware interrupt chip descriptor * -- cgit v1.2.3