diff mbox

TI-Davinci 6446 oops on interrupts

Message ID alpine.LFD.2.02.1106061719290.13964@ionos (mailing list archive)
State New, archived
Headers show

Commit Message

Thomas Gleixner June 6, 2011, 3:25 p.m. UTC
On Mon, 6 Jun 2011, Holger Freyther wrote:
> On 06/06/2011 04:54 PM, Thomas Gleixner wrote:
> 
> and both interrupts should be on REG1.. so for IRQ56 it looks like this method
> is entered with bogus data. Again, I have no idea about the underlying code,
> but could there be an issue with chained irq and the GC IRC code?

Crap, yes. The code which does the chained handler setup overwrites
chip_data.

Subject: arm: davinci: Fix fallout from generic irq chip conversion
From: Thomas Gleixner <tglx@linutronix.de>
Date: Mon, 06 Jun 2011 11:51:43 +0200

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/arm/mach-davinci/gpio.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Holger Freyther June 6, 2011, 3:32 p.m. UTC | #1
On 06/06/2011 05:25 PM, Thomas Gleixner wrote:

> Crap, yes. The code which does the chained handler setup overwrites
> chip_data.
> 

Ah, you were too fast in the end, I just finished reading linux/irq.h. :)



> Subject: arm: davinci: Fix fallout from generic irq chip conversion
> From: Thomas Gleixner <tglx@linutronix.de>
> Date: Mon, 06 Jun 2011 11:51:43 +0200
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Tested-by: Holger Hans Peter Freyther <holger@freyther.de>
Thomas Gleixner June 6, 2011, 9:31 p.m. UTC | #2
Kevin,

On Mon, 6 Jun 2011, Holger Freyther wrote:

> On 06/06/2011 05:25 PM, Thomas Gleixner wrote:
> 
> > Crap, yes. The code which does the chained handler setup overwrites
> > chip_data.
> > 
> 
> Ah, you were too fast in the end, I just finished reading linux/irq.h. :)
> 
> 
> 
> > Subject: arm: davinci: Fix fallout from generic irq chip conversion
> > From: Thomas Gleixner <tglx@linutronix.de>
> > Date: Mon, 06 Jun 2011 11:51:43 +0200
> > 
> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> 
> Tested-by: Holger Hans Peter Freyther <holger@freyther.de>

can you please pick that up? It should have a Cc: stable@kernel.org
tag as well.

Thanks,

	tglx
Kevin Hilman June 6, 2011, 10:50 p.m. UTC | #3
Thomas Gleixner <tglx@linutronix.de> writes:

> Kevin,
>
> On Mon, 6 Jun 2011, Holger Freyther wrote:
>
>> On 06/06/2011 05:25 PM, Thomas Gleixner wrote:
>> 
>> > Crap, yes. The code which does the chained handler setup overwrites
>> > chip_data.
>> > 
>> 
>> Ah, you were too fast in the end, I just finished reading linux/irq.h. :)
>> 
>> 
>> 
>> > Subject: arm: davinci: Fix fallout from generic irq chip conversion
>> > From: Thomas Gleixner <tglx@linutronix.de>
>> > Date: Mon, 06 Jun 2011 11:51:43 +0200
>> > 
>> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>> 
>> Tested-by: Holger Hans Peter Freyther <holger@freyther.de>
>
> can you please pick that up? It should have a Cc: stable@kernel.org
> tag as well.

Yup, will do.

Thanks,

Kevin
Sekhar Nori June 7, 2011, 6:13 p.m. UTC | #4
Hi Thomas,

On Tue, Jun 07, 2011 at 03:01:31, Thomas Gleixner wrote:

> > > Subject: arm: davinci: Fix fallout from generic irq chip conversion
> > > From: Thomas Gleixner <tglx@linutronix.de>
> > > Date: Mon, 06 Jun 2011 11:51:43 +0200
> > > 
> > > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > 
> > Tested-by: Holger Hans Peter Freyther <holger@freyther.de>
> 
> can you please pick that up? It should have a Cc: stable@kernel.org
> tag as well.

But generic IRQ chip support for DaVinci was merged only in
v3.0-rc1.

$ git log --tags --source --oneline arch/arm/mach-davinci/irq.c
aac4dd1 v3.0-rc1 arm: davinci: Use generic irq chip

Thanks,
Sekhar
Thomas Gleixner June 7, 2011, 10:59 p.m. UTC | #5
On Tue, 7 Jun 2011, Nori, Sekhar wrote:

> Hi Thomas,
> 
> On Tue, Jun 07, 2011 at 03:01:31, Thomas Gleixner wrote:
> 
> > > > Subject: arm: davinci: Fix fallout from generic irq chip conversion
> > > > From: Thomas Gleixner <tglx@linutronix.de>
> > > > Date: Mon, 06 Jun 2011 11:51:43 +0200
> > > > 
> > > > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > > 
> > > Tested-by: Holger Hans Peter Freyther <holger@freyther.de>
> > 
> > can you please pick that up? It should have a Cc: stable@kernel.org
> > tag as well.
> 
> But generic IRQ chip support for DaVinci was merged only in
> v3.0-rc1.
> 
> $ git log --tags --source --oneline arch/arm/mach-davinci/irq.c
> aac4dd1 v3.0-rc1 arm: davinci: Use generic irq chip

Of course. Stupid me !
diff mbox

Patch

Index: linux-2.6/arch/arm/mach-davinci/gpio.c
===================================================================
--- linux-2.6.orig/arch/arm/mach-davinci/gpio.c
+++ linux-2.6/arch/arm/mach-davinci/gpio.c
@@ -252,9 +252,11 @@  static struct irq_chip gpio_irqchip = {
 static void
 gpio_irq_handler(unsigned irq, struct irq_desc *desc)
 {
-	struct davinci_gpio_regs __iomem *g = irq2regs(irq);
+	struct davinci_gpio_regs __iomem *g;
 	u32 mask = 0xffff;
 
+	g = (__force struct davinci_gpio_regs __iomem *) irq_desc_get_handler_data(desc);
+
 	/* we only care about one bank */
 	if (irq & 1)
 		mask <<= 16;
@@ -422,8 +424,7 @@  static int __init davinci_gpio_irq_setup
 
 		/* set up all irqs in this bank */
 		irq_set_chained_handler(bank_irq, gpio_irq_handler);
-		irq_set_chip_data(bank_irq, (__force void *)g);
-		irq_set_handler_data(bank_irq, (void *)irq);
+		irq_set_handler_data(bank_irq, (__force void *)g);
 
 		for (i = 0; i < 16 && gpio < ngpio; i++, irq++, gpio++) {
 			irq_set_chip(irq, &gpio_irqchip);