aboutsummaryrefslogtreecommitdiff
path: root/kernel/irq
diff options
context:
space:
mode:
authorThomas Gleixner2011-03-27 11:02:49 +0200
committerThomas Gleixner2011-03-27 17:45:58 +0200
commit801a0e9ae36e9b487092e31699d28c0b9a21ad52 (patch)
treec448d150797272b09417f5410e7570742e59368b /kernel/irq
parentd72274e5895d11570a0a4a3214a1933c86d5ccb7 (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/irq')
-rw-r--r--kernel/irq/chip.c5
-rw-r--r--kernel/irq/irqdesc.c1
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);
static void irq_state_clr_disabled(struct irq_desc *desc)
{
desc->istate &= ~IRQS_DISABLED;
+ irqd_clear(&desc->irq_data, IRQD_IRQ_DISABLED);
irq_compat_clr_disabled(desc);
}
static void irq_state_set_disabled(struct irq_desc *desc)
{
desc->istate |= IRQS_DISABLED;
+ irqd_set(&desc->irq_data, IRQD_IRQ_DISABLED);
irq_compat_set_disabled(desc);
}
@@ -648,8 +650,7 @@ __irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
if (handle == handle_bad_irq) {
if (desc->irq_data.chip != &no_irq_chip)
mask_ack_irq(desc);
- irq_compat_set_disabled(desc);
- desc->istate |= IRQS_DISABLED;
+ irq_state_set_disabled(desc);
desc->depth = 1;
}
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)
desc->irq_data.handler_data = NULL;
desc->irq_data.msi_desc = NULL;
irq_settings_clr_and_set(desc, ~0, _IRQ_DEFAULT_INIT_FLAGS);
+ irqd_set(&desc->irq_data, IRQD_IRQ_DISABLED);
desc->istate = IRQS_DISABLED;
desc->handle_irq = handle_bad_irq;
desc->depth = 1;