This is a note to let you know that I've just added the patch titled

    genirq: Add IRQF_FORCE_RESUME

to the 2.6.32-longterm tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/longterm/longterm-queue-2.6.32.git;a=summary

The filename of the patch is:
     genirq-add-irqf_force_resume.patch
and it can be found in the queue-2.6.32 subdirectory.

If you, or anyone else, feels it should not be added to the 2.6.32 longterm 
tree,
please let <[email protected]> know about it.


>From dc5f219e88294b93009eef946251251ffffb6d60 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <[email protected]>
Date: Fri, 4 Feb 2011 13:19:20 +0100
Subject: genirq: Add IRQF_FORCE_RESUME

From: Thomas Gleixner <[email protected]>

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 <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Stefan Bader <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 include/linux/interrupt.h |    3 ++-
 kernel/irq/manage.c       |   11 ++++++++++-
 kernel/irq/pm.c           |    3 ---
 3 files changed, 12 insertions(+), 5 deletions(-)

--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -53,7 +53,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
@@ -65,6 +65,7 @@
 #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)
 
--- 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:
--- 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);


Patches currently in longterm-queue-2.6.32 which might be from 
[email protected] are

/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/time-compensate-for-rounding-on-odd-frequency-clocksources.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/xen-use-irqf_force_resume.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/seqlock-don-t-smp_rmb-in-seqlock-reader-spin-loop.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/genirq-add-irqf_force_resume.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to