diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-04 13:19:20 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-23 15:24:09 -0700 |
commit | 8ff753b4ac3b57dc87576e750463521a27e354f9 (patch) | |
tree | e26de4fdd8764ee06dd2ee04f34a7c15214ebc8f /kernel | |
parent | f9f09329407e3a11140827ba71d8f9d9ede42823 (diff) |
genirq: Add IRQF_FORCE_RESUME
commit dc5f219e88294b93009eef946251251ffffb6d60 upstream.
Xen needs to reenable interrupts which are marked IRQF_NO_SUSPEND in the
resume path. Add a flag to force the reenabling in the resume code.
Tested-and-acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/irq/manage.c | 11 | ||||
-rw-r--r-- | kernel/irq/pm.c | 3 |
2 files changed, 10 insertions, 4 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 5fad88bdcfa..d40ecd5822e 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -265,8 +265,17 @@ EXPORT_SYMBOL(disable_irq); void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume) { - if (resume) + if (resume) { + if (!(desc->status & IRQ_SUSPENDED)) { + if (!desc->action) + return; + if (!(desc->action->flags & IRQF_FORCE_RESUME)) + return; + /* Pretend that it got disabled ! */ + desc->depth++; + } desc->status &= ~IRQ_SUSPENDED; + } switch (desc->depth) { case 0: diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c index a0bb09e7986..0067abb3a9a 100644 --- a/kernel/irq/pm.c +++ b/kernel/irq/pm.c @@ -53,9 +53,6 @@ void resume_device_irqs(void) for_each_irq_desc(irq, desc) { unsigned long flags; - if (!(desc->status & IRQ_SUSPENDED)) - continue; - spin_lock_irqsave(&desc->lock, flags); __enable_irq(desc, irq, true); spin_unlock_irqrestore(&desc->lock, flags); |