* [PATCH] ARM: mxs: icoll: Fix interrupts gpio bank 0
@ 2013-05-28 15:00 Markus Pargmann
2013-05-29 14:42 ` Shawn Guo
0 siblings, 1 reply; 3+ messages in thread
From: Markus Pargmann @ 2013-05-28 15:00 UTC (permalink / raw)
To: linux-arm-kernel
The mxs interrupt controller does not support polling for interrupts,
but the driver still does it, which is a relict from
pre-MULTI_IRQ_HANDLER times.
The existing code assumes that 0x7f means no interrupt, but this value
is an actually valid irq number, namely gpio bank 0's irq. This results
in the driver not detecting when irq 0x7f is active which makes the
machine effectively dead lock.
This patch removes the interrupt poll loop and allows usage of gpio0
interrupt without an infinite loop.
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Cc: stable at vger.kernel.org
---
drivers/irqchip/irq-mxs.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/irqchip/irq-mxs.c b/drivers/irqchip/irq-mxs.c
index 29889bb..63b3d4e 100644
--- a/drivers/irqchip/irq-mxs.c
+++ b/drivers/irqchip/irq-mxs.c
@@ -76,16 +76,10 @@ asmlinkage void __exception_irq_entry icoll_handle_irq(struct pt_regs *regs)
{
u32 irqnr;
- do {
- irqnr = __raw_readl(icoll_base + HW_ICOLL_STAT_OFFSET);
- if (irqnr != 0x7f) {
- __raw_writel(irqnr, icoll_base + HW_ICOLL_VECTOR);
- irqnr = irq_find_mapping(icoll_domain, irqnr);
- handle_IRQ(irqnr, regs);
- continue;
- }
- break;
- } while (1);
+ irqnr = __raw_readl(icoll_base + HW_ICOLL_STAT_OFFSET);
+ __raw_writel(irqnr, icoll_base + HW_ICOLL_VECTOR);
+ irqnr = irq_find_mapping(icoll_domain, irqnr);
+ handle_IRQ(irqnr, regs);
}
static int icoll_irq_domain_map(struct irq_domain *d, unsigned int virq,
--
1.8.2.rc2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ARM: mxs: icoll: Fix interrupts gpio bank 0
2013-05-28 15:00 [PATCH] ARM: mxs: icoll: Fix interrupts gpio bank 0 Markus Pargmann
@ 2013-05-29 14:42 ` Shawn Guo
2013-06-03 15:15 ` Shawn Guo
0 siblings, 1 reply; 3+ messages in thread
From: Shawn Guo @ 2013-05-29 14:42 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, May 28, 2013 at 05:00:57PM +0200, Markus Pargmann wrote:
> The mxs interrupt controller does not support polling for interrupts,
> but the driver still does it, which is a relict from
> pre-MULTI_IRQ_HANDLER times.
>
> The existing code assumes that 0x7f means no interrupt, but this value
> is an actually valid irq number, namely gpio bank 0's irq. This results
> in the driver not detecting when irq 0x7f is active which makes the
> machine effectively dead lock.
>
> This patch removes the interrupt poll loop and allows usage of gpio0
> interrupt without an infinite loop.
>
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> Cc: stable at vger.kernel.org
Thomas, can you please help handle the fix? If yes, here is my ack.
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Otherwise, I can send it through arm-soc tree if you're fine with it.
Shawn
> ---
> drivers/irqchip/irq-mxs.c | 14 ++++----------
> 1 file changed, 4 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/irqchip/irq-mxs.c b/drivers/irqchip/irq-mxs.c
> index 29889bb..63b3d4e 100644
> --- a/drivers/irqchip/irq-mxs.c
> +++ b/drivers/irqchip/irq-mxs.c
> @@ -76,16 +76,10 @@ asmlinkage void __exception_irq_entry icoll_handle_irq(struct pt_regs *regs)
> {
> u32 irqnr;
>
> - do {
> - irqnr = __raw_readl(icoll_base + HW_ICOLL_STAT_OFFSET);
> - if (irqnr != 0x7f) {
> - __raw_writel(irqnr, icoll_base + HW_ICOLL_VECTOR);
> - irqnr = irq_find_mapping(icoll_domain, irqnr);
> - handle_IRQ(irqnr, regs);
> - continue;
> - }
> - break;
> - } while (1);
> + irqnr = __raw_readl(icoll_base + HW_ICOLL_STAT_OFFSET);
> + __raw_writel(irqnr, icoll_base + HW_ICOLL_VECTOR);
> + irqnr = irq_find_mapping(icoll_domain, irqnr);
> + handle_IRQ(irqnr, regs);
> }
>
> static int icoll_irq_domain_map(struct irq_domain *d, unsigned int virq,
> --
> 1.8.2.rc2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ARM: mxs: icoll: Fix interrupts gpio bank 0
2013-05-29 14:42 ` Shawn Guo
@ 2013-06-03 15:15 ` Shawn Guo
0 siblings, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2013-06-03 15:15 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, May 29, 2013 at 10:42:58PM +0800, Shawn Guo wrote:
> On Tue, May 28, 2013 at 05:00:57PM +0200, Markus Pargmann wrote:
> > The mxs interrupt controller does not support polling for interrupts,
> > but the driver still does it, which is a relict from
> > pre-MULTI_IRQ_HANDLER times.
> >
> > The existing code assumes that 0x7f means no interrupt, but this value
> > is an actually valid irq number, namely gpio bank 0's irq. This results
> > in the driver not detecting when irq 0x7f is active which makes the
> > machine effectively dead lock.
> >
> > This patch removes the interrupt poll loop and allows usage of gpio0
> > interrupt without an infinite loop.
> >
> > Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> > Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> > Cc: stable at vger.kernel.org
>
> Thomas, can you please help handle the fix? If yes, here is my ack.
>
> Acked-by: Shawn Guo <shawn.guo@linaro.org>
>
> Otherwise, I can send it through arm-soc tree if you're fine with it.
Thomas,
I'm sending the fix through arm-soc, and let me know if you have problem
with that.
Shawn
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-03 15:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-28 15:00 [PATCH] ARM: mxs: icoll: Fix interrupts gpio bank 0 Markus Pargmann
2013-05-29 14:42 ` Shawn Guo
2013-06-03 15:15 ` Shawn Guo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).