linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hdegoede@redhat.com (Hans de Goede)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] pinctrl-sunxi: Fix hang on gpio irq
Date: Mon, 17 Feb 2014 22:19:42 +0100	[thread overview]
Message-ID: <1392671984-29872-3-git-send-email-hdegoede@redhat.com> (raw)
In-Reply-To: <1392671984-29872-1-git-send-email-hdegoede@redhat.com>

Our irq handler was missing chained_irq_enter / exit calls, causing a
hard hang as soon as a gpio irq happened.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/pinctrl/pinctrl-sunxi.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/pinctrl/pinctrl-sunxi.c b/drivers/pinctrl/pinctrl-sunxi.c
index 74635cc..cc9bd1b 100644
--- a/drivers/pinctrl/pinctrl-sunxi.c
+++ b/drivers/pinctrl/pinctrl-sunxi.c
@@ -13,6 +13,7 @@
 #include <linux/io.h>
 #include <linux/clk.h>
 #include <linux/gpio.h>
+#include <linux/irqchip/chained_irq.h>
 #include <linux/irqdomain.h>
 #include <linux/module.h>
 #include <linux/of.h>
@@ -665,9 +666,12 @@ static struct irq_chip sunxi_pinctrl_irq_chip = {
 
 static void sunxi_pinctrl_irq_handler(unsigned irq, struct irq_desc *desc)
 {
+	struct irq_chip *chip = irq_get_chip(irq);
 	struct sunxi_pinctrl *pctl = irq_get_handler_data(irq);
 	const unsigned long reg = readl(pctl->membase + IRQ_STATUS_REG);
 
+	chained_irq_enter(chip, desc);
+
 	/* Clear all interrupts */
 	writel(reg, pctl->membase + IRQ_STATUS_REG);
 
@@ -679,6 +683,7 @@ static void sunxi_pinctrl_irq_handler(unsigned irq, struct irq_desc *desc)
 			generic_handle_irq(pin_irq);
 		}
 	}
+	chained_irq_exit(chip, desc);
 }
 
 static struct of_device_id sunxi_pinctrl_match[] = {
-- 
1.8.5.3

  parent reply	other threads:[~2014-02-17 21:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-17 21:19 [PATCH 1/4] pinctrl-sunxi: various fixes Hans de Goede
2014-02-17 21:19 ` [PATCH 1/4] pinctrl-sunxi: Fix sun5i-a13 port F multiplexing Hans de Goede
2014-02-25  8:31   ` Linus Walleij
2014-02-17 21:19 ` Hans de Goede [this message]
2014-02-25  8:33   ` [PATCH 2/4] pinctrl-sunxi: Fix hang on gpio irq Linus Walleij
2014-02-17 21:19 ` [PATCH 3/4] pinctrl-sunxi: Fix masking when setting irq type Hans de Goede
2014-02-18  7:49   ` Maxime Ripard
2014-02-25  8:35   ` Linus Walleij
2014-02-17 21:19 ` [PATCH 4/4] pinctrl-sunxi: Fix interrupt register offset calculation Hans de Goede
2014-02-18  8:05   ` Maxime Ripard
2014-02-25  8:38   ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392671984-29872-3-git-send-email-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).