aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-04 07:19:20 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-02-08 10:36:47 -0500
commitdc5f219e88294b93009eef946251251ffffb6d60 (patch)
treed4fd68261803ee6bd90ed4b422053d879352228e /kernel/irq
parent100b33c8bd8a3235fd0b7948338d6cbb3db3c63d (diff)
genirq: Add IRQF_FORCE_RESUME
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>
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/manage.c11
-rw-r--r--kernel/irq/pm.c3
2 files changed, 10 insertions, 4 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 0caa59f747dd..b4198ee8cfdf 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -282,8 +282,17 @@ EXPORT_SYMBOL(disable_irq);
282 282
283void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume) 283void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume)
284{ 284{
285 if (resume) 285 if (resume) {
286 if (!(desc->status & IRQ_SUSPENDED)) {
287 if (!desc->action)
288 return;
289 if (!(desc->action->flags & IRQF_FORCE_RESUME))
290 return;
291 /* Pretend that it got disabled ! */
292 desc->depth++;
293 }
286 desc->status &= ~IRQ_SUSPENDED; 294 desc->status &= ~IRQ_SUSPENDED;
295 }
287 296
288 switch (desc->depth) { 297 switch (desc->depth) {
289 case 0: 298 case 0:
diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
index 0d4005d85b03..d6bfb89cce91 100644
--- a/kernel/irq/pm.c
+++ b/kernel/irq/pm.c
@@ -53,9 +53,6 @@ void resume_device_irqs(void)
53 for_each_irq_desc(irq, desc) { 53 for_each_irq_desc(irq, desc) {
54 unsigned long flags; 54 unsigned long flags;
55 55
56 if (!(desc->status & IRQ_SUSPENDED))
57 continue;
58
59 raw_spin_lock_irqsave(&desc->lock, flags); 56 raw_spin_lock_irqsave(&desc->lock, flags);
60 __enable_irq(desc, irq, true); 57 __enable_irq(desc, irq, true);
61 raw_spin_unlock_irqrestore(&desc->lock, flags); 58 raw_spin_unlock_irqrestore(&desc->lock, flags);