compat: backport irq_set_status_flags() and irq_clear_status_flags()
authorLuis R. Rodriguez <mcgrof@frijolero.org>
Fri, 20 Jul 2012 19:23:52 +0000 (12:23 -0700)
committerLuis R. Rodriguez <mcgrof@frijolero.org>
Fri, 20 Jul 2012 19:28:13 +0000 (12:28 -0700)
This further backports this patch:

commit 442471848f5abb55b99cba1229301655f67492b4
Author: Thomas Gleixner <tglx@linutronix.de>
Date:   Tue Sep 28 10:40:18 2010 +0200

    genirq: Provide status modifier

    Provide a irq_desc.status modifier function to cleanup the direct
    access to irq_desc in arch and driver code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
The reason is that although irq_modify_status() was
backported the commit ee9c8a:

commit ee9c8a04666ba15762f736f9030e6e8df02ca1a5
Author: Grazvydas Ignotas <notasas@gmail.com>
Date:   Fri May 18 03:04:08 2012 +0300

    wl1251: fix oops on early interrupt

    commit f380f2c4a12e913356bd49f8790ec1063c4fe9f8 upstream.

    This driver disables interrupt just after requesting it and enables it
    later, after interface is up. However currently there is a time window
    between request_irq() and disable_irq() where if interrupt arrives, the
    driver oopses because it's not yet ready to process it. This can be
    reproduced by inserting the module, associating and removing the module
    multiple times.

    Eliminate this race by setting IRQF_NOAUTOEN flag before request_irq().

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
was backported and merged into v3.4.6 therefore requiring these
set of calls onto older kernels as well. This should be merged
into the compat linux-3.4.y branch so that a respective
compat-wireless based on v3.4.6 can be made.

mcgrof@tux ~/compat (git::master)$ ckmake -t
Trying kernel 3.4.0-030400rc1-generic [OK]
Trying kernel 3.3.7-030307-generic [OK]
Trying kernel 3.2.2-030202-generic [OK]
Trying kernel 3.1.10-030110-generic [OK]
Trying kernel 3.0.18-030018-generic [OK]
Trying kernel 2.6.39-02063904-generic [OK]
Trying kernel 2.6.38-02063808-generic [OK]
Trying kernel 2.6.37-02063706-generic [OK]
Trying kernel 2.6.36-02063604-generic [OK]
Trying kernel 2.6.35-02063512-generic [OK]
Trying kernel 2.6.34-02063410-generic [OK]
Trying kernel 2.6.33-02063305-generic [OK]
Trying kernel 2.6.32-02063255-generic [OK]
Trying kernel 2.6.31-02063113-generic [OK]
Trying kernel 2.6.30-02063010-generic [OK]
Trying kernel 2.6.29-02062906-generic [OK]
Trying kernel 2.6.28-02062810-generic [OK]
Trying kernel 2.6.27-020627-generic [OK]
Trying kernel 2.6.26-020626-generic [OK]
Trying kernel 2.6.25-020625-generic [OK]
Trying kernel 2.6.24-020624-generic [OK]

real    2m28.330s
user    4m28.170s
sys     0m47.580s

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
include/linux/compat-2.6.37.h

index 266772aba67040cbd67593d86f5ab344d1034938..b87aa2f03f5de3068c5b2fe35f146402761917e6 100644 (file)
 
 void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set);
 
+static inline void irq_set_status_flags(unsigned int irq, unsigned long set)
+{
+       irq_modify_status(irq, 0, set);
+}
+
+static inline void irq_clear_status_flags(unsigned int irq, unsigned long clr)
+{
+       irq_modify_status(irq, clr, 0);
+}
+
 static inline int proto_ports_offset(int proto)
 {
        switch (proto) {