Patchwork [4/5] Revert "genirq: Add IRQF_FORCE_RESUME"

login
register
mail settings
Submitter Herton Ronaldo Krzesinski
Date Dec. 3, 2011, 12:55 a.m.
Message ID <1322873716-22760-5-git-send-email-herton.krzesinski@canonical.com>
Download mbox | patch
Permalink /patch/129005/
State New
Headers show

Comments

Herton Ronaldo Krzesinski - Dec. 3, 2011, 12:55 a.m.
From: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>

This reverts commit b29332fae67a76519b0863675b340aeb9e81b0d2.

Since we reverted the change "xen: Use IRQF_FORCE_RESUME", this is now
also uneeded.

BugLink: http://bugs.launchpad.net/bugs/898139
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
---
 include/linux/interrupt.h |    3 +--
 kernel/irq/manage.c       |   11 +----------
 kernel/irq/pm.c           |    3 +++
 3 files changed, 5 insertions(+), 12 deletions(-)

Patch

diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 146712c..a0384a4 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -54,7 +54,7 @@ 
  *                Used by threaded interrupts which need to keep the
  *                irq line disabled until the threaded handler has been run.
  * IRQF_NO_SUSPEND - Do not disable this IRQ during suspend
- * IRQF_FORCE_RESUME - Force enable it on resume even if IRQF_NO_SUSPEND is set
+ *
  */
 #define IRQF_DISABLED		0x00000020
 #define IRQF_SAMPLE_RANDOM	0x00000040
@@ -66,7 +66,6 @@ 
 #define IRQF_IRQPOLL		0x00001000
 #define IRQF_ONESHOT		0x00002000
 #define IRQF_NO_SUSPEND		0x00004000
-#define IRQF_FORCE_RESUME	0x00008000
 
 #define IRQF_TIMER		(__IRQF_TIMER | IRQF_NO_SUSPEND)
 
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index a6a8b6a..6a2281f 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -281,17 +281,8 @@  EXPORT_SYMBOL(disable_irq);
 
 void __enable_irq(struct irq_desc *desc, unsigned int irq, bool 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++;
-		}
+	if (resume)
 		desc->status &= ~IRQ_SUSPENDED;
-	}
 
 	switch (desc->depth) {
 	case 0:
diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
index d6bfb89..0d4005d 100644
--- a/kernel/irq/pm.c
+++ b/kernel/irq/pm.c
@@ -53,6 +53,9 @@  void resume_device_irqs(void)
 	for_each_irq_desc(irq, desc) {
 		unsigned long flags;
 
+		if (!(desc->status & IRQ_SUSPENDED))
+			continue;
+
 		raw_spin_lock_irqsave(&desc->lock, flags);
 		__enable_irq(desc, irq, true);
 		raw_spin_unlock_irqrestore(&desc->lock, flags);