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

    gpio/davinci: fix enabling unbanked GPIO IRQs

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

The filename of the patch is:
     gpio-davinci-fix-enabling-unbanked-gpio-irqs.patch
and it can be found in the queue-3.2 subdirectory.

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


>From 81b279d80a63628e580c71a31d30a8c3b3047ad4 Mon Sep 17 00:00:00 2001
From: Sekhar Nori <[email protected]>
Date: Sun, 11 Mar 2012 18:16:12 +0530
Subject: gpio/davinci: fix enabling unbanked GPIO IRQs

From: Sekhar Nori <[email protected]>

commit 81b279d80a63628e580c71a31d30a8c3b3047ad4 upstream.

Unbanked GPIO IRQ handling code made a copy of just
the irq_chip structure for GPIO IRQ lines which caused
problems after the generic IRQ chip conversion because
there was no valid irq_chip_type structure with the
right "regs" populated. irq_gc_mask_set_bit() was
therefore accessing random addresses.

Fix it by making a copy of irq_chip_type structure
instead. This will ensure sane register offsets.

Reported-by: Jon Povey <[email protected]>
Tested-by: Jon Povey <[email protected]>
Signed-off-by: Sekhar Nori <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/gpio/gpio-davinci.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -386,7 +386,7 @@ static int __init davinci_gpio_irq_setup
         * IRQ mux conflicts; gpio_irq_type_unbanked() is only for GPIOs.
         */
        if (soc_info->gpio_unbanked) {
-               static struct irq_chip gpio_irqchip_unbanked;
+               static struct irq_chip_type gpio_unbanked;
 
                /* pass "bank 0" GPIO IRQs to AINTC */
                chips[0].chip.to_irq = gpio_to_irq_unbanked;
@@ -394,9 +394,10 @@ static int __init davinci_gpio_irq_setup
 
                /* AINTC handles mask/unmask; GPIO handles triggering */
                irq = bank_irq;
-               gpio_irqchip_unbanked = *irq_get_chip(irq);
-               gpio_irqchip_unbanked.name = "GPIO-AINTC";
-               gpio_irqchip_unbanked.irq_set_type = gpio_irq_type_unbanked;
+               gpio_unbanked = *container_of(irq_get_chip(irq),
+                                             struct irq_chip_type, chip);
+               gpio_unbanked.chip.name = "GPIO-AINTC";
+               gpio_unbanked.chip.irq_set_type = gpio_irq_type_unbanked;
 
                /* default trigger: both edges */
                g = gpio2regs(0);
@@ -405,7 +406,7 @@ static int __init davinci_gpio_irq_setup
 
                /* set the direct IRQs up to use that irqchip */
                for (gpio = 0; gpio < soc_info->gpio_unbanked; gpio++, irq++) {
-                       irq_set_chip(irq, &gpio_irqchip_unbanked);
+                       irq_set_chip(irq, &gpio_unbanked.chip);
                        irq_set_handler_data(irq, &chips[gpio / 32]);
                        irq_set_status_flags(irq, IRQ_TYPE_EDGE_BOTH);
                }


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

queue-3.2/gpio-davinci-fix-oops-on-unbanked-gpio-irq-request.patch
queue-3.2/gpio-davinci-fix-enabling-unbanked-gpio-irqs.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to