Re: [PATCH] pinctrl: armada-37xx: Fix spurious irq management

2018-05-24 Thread Linus Walleij
On Wed, May 23, 2018 at 10:44 AM, Gregory CLEMENT
 wrote:

> From: Terry Zhou 
>
> Until now, if we found spurious irq in irq_handler, we only updated the
> status in register but not the status in the code. Due to this the system
> will got stuck dues to the infinite loop
>
> [gregory.clem...@bootlin.com: update comment and add fix and stable tags]
> Fixes: 30ac0d3b0702 ("pinctrl: armada-37xx: Add edge both type gpio irq 
> support")
> Cc: 
> Signed-off-by: Terry Zhou 
> Reviewed-by: Gregory CLEMENT 
> Signed-off-by: Gregory CLEMENT 

Patch applied.

Yours,
Linus Walleij


Re: [PATCH] pinctrl: armada-37xx: Fix spurious irq management

2018-05-24 Thread Linus Walleij
On Wed, May 23, 2018 at 10:44 AM, Gregory CLEMENT
 wrote:

> From: Terry Zhou 
>
> Until now, if we found spurious irq in irq_handler, we only updated the
> status in register but not the status in the code. Due to this the system
> will got stuck dues to the infinite loop
>
> [gregory.clem...@bootlin.com: update comment and add fix and stable tags]
> Fixes: 30ac0d3b0702 ("pinctrl: armada-37xx: Add edge both type gpio irq 
> support")
> Cc: 
> Signed-off-by: Terry Zhou 
> Reviewed-by: Gregory CLEMENT 
> Signed-off-by: Gregory CLEMENT 

Patch applied.

Yours,
Linus Walleij


[PATCH] pinctrl: armada-37xx: Fix spurious irq management

2018-05-23 Thread Gregory CLEMENT
From: Terry Zhou 

Until now, if we found spurious irq in irq_handler, we only updated the
status in register but not the status in the code. Due to this the system
will got stuck dues to the infinite loop

[gregory.clem...@bootlin.com: update comment and add fix and stable tags]
Fixes: 30ac0d3b0702 ("pinctrl: armada-37xx: Add edge both type gpio irq 
support")
Cc: 
Signed-off-by: Terry Zhou 
Reviewed-by: Gregory CLEMENT 
Signed-off-by: Gregory CLEMENT 
---
 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c 
b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 5b63248c8209..7bef929bd7fe 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -679,12 +679,13 @@ static void armada_37xx_irq_handler(struct irq_desc *desc)
writel(1 << hwirq,
   info->base +
   IRQ_STATUS + 4 * i);
-   continue;
+   goto update_status;
}
}
 
generic_handle_irq(virq);
 
+update_status:
/* Update status in case a new IRQ appears */
spin_lock_irqsave(>irq_lock, flags);
status = readl_relaxed(info->base +
-- 
2.17.0



[PATCH] pinctrl: armada-37xx: Fix spurious irq management

2018-05-23 Thread Gregory CLEMENT
From: Terry Zhou 

Until now, if we found spurious irq in irq_handler, we only updated the
status in register but not the status in the code. Due to this the system
will got stuck dues to the infinite loop

[gregory.clem...@bootlin.com: update comment and add fix and stable tags]
Fixes: 30ac0d3b0702 ("pinctrl: armada-37xx: Add edge both type gpio irq 
support")
Cc: 
Signed-off-by: Terry Zhou 
Reviewed-by: Gregory CLEMENT 
Signed-off-by: Gregory CLEMENT 
---
 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c 
b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 5b63248c8209..7bef929bd7fe 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -679,12 +679,13 @@ static void armada_37xx_irq_handler(struct irq_desc *desc)
writel(1 << hwirq,
   info->base +
   IRQ_STATUS + 4 * i);
-   continue;
+   goto update_status;
}
}
 
generic_handle_irq(virq);
 
+update_status:
/* Update status in case a new IRQ appears */
spin_lock_irqsave(>irq_lock, flags);
status = readl_relaxed(info->base +
-- 
2.17.0