Message ID | alpine.LFD.2.02.1106061719290.13964@ionos (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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>
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
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
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
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 !
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);