diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-03-27 05:02:49 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-03-27 11:45:58 -0400 |
commit | 801a0e9ae36e9b487092e31699d28c0b9a21ad52 (patch) | |
tree | c448d150797272b09417f5410e7570742e59368b /kernel | |
parent | d72274e5895d11570a0a4a3214a1933c86d5ccb7 (diff) |
genirq: Add irq disabled flag to irq_data state
Some irq_chip implementation require to know the disabled state of the
interrupt in certain callbacks. Add a state flag and accessor to
irq_data.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/irq/chip.c | 5 | ||||
-rw-r--r-- | kernel/irq/irqdesc.c | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index c35d74c08b50..0a890bdd9c63 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -141,12 +141,14 @@ EXPORT_SYMBOL_GPL(irq_get_irq_data); | |||
141 | static void irq_state_clr_disabled(struct irq_desc *desc) | 141 | static void irq_state_clr_disabled(struct irq_desc *desc) |
142 | { | 142 | { |
143 | desc->istate &= ~IRQS_DISABLED; | 143 | desc->istate &= ~IRQS_DISABLED; |
144 | irqd_clear(&desc->irq_data, IRQD_IRQ_DISABLED); | ||
144 | irq_compat_clr_disabled(desc); | 145 | irq_compat_clr_disabled(desc); |
145 | } | 146 | } |
146 | 147 | ||
147 | static void irq_state_set_disabled(struct irq_desc *desc) | 148 | static void irq_state_set_disabled(struct irq_desc *desc) |
148 | { | 149 | { |
149 | desc->istate |= IRQS_DISABLED; | 150 | desc->istate |= IRQS_DISABLED; |
151 | irqd_set(&desc->irq_data, IRQD_IRQ_DISABLED); | ||
150 | irq_compat_set_disabled(desc); | 152 | irq_compat_set_disabled(desc); |
151 | } | 153 | } |
152 | 154 | ||
@@ -648,8 +650,7 @@ __irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | |||
648 | if (handle == handle_bad_irq) { | 650 | if (handle == handle_bad_irq) { |
649 | if (desc->irq_data.chip != &no_irq_chip) | 651 | if (desc->irq_data.chip != &no_irq_chip) |
650 | mask_ack_irq(desc); | 652 | mask_ack_irq(desc); |
651 | irq_compat_set_disabled(desc); | 653 | irq_state_set_disabled(desc); |
652 | desc->istate |= IRQS_DISABLED; | ||
653 | desc->depth = 1; | 654 | desc->depth = 1; |
654 | } | 655 | } |
655 | desc->handle_irq = handle; | 656 | desc->handle_irq = handle; |
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index 6fb014f172f7..96c3268a509d 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c | |||
@@ -80,6 +80,7 @@ static void desc_set_defaults(unsigned int irq, struct irq_desc *desc, int node) | |||
80 | desc->irq_data.handler_data = NULL; | 80 | desc->irq_data.handler_data = NULL; |
81 | desc->irq_data.msi_desc = NULL; | 81 | desc->irq_data.msi_desc = NULL; |
82 | irq_settings_clr_and_set(desc, ~0, _IRQ_DEFAULT_INIT_FLAGS); | 82 | irq_settings_clr_and_set(desc, ~0, _IRQ_DEFAULT_INIT_FLAGS); |
83 | irqd_set(&desc->irq_data, IRQD_IRQ_DISABLED); | ||
83 | desc->istate = IRQS_DISABLED; | 84 | desc->istate = IRQS_DISABLED; |
84 | desc->handle_irq = handle_bad_irq; | 85 | desc->handle_irq = handle_bad_irq; |
85 | desc->depth = 1; | 86 | desc->depth = 1; |