public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Linux OMAP Mailing List <linux-omap@vger.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Tony Lindgren <tony@atomide.com>,
	Thomas Gleixner <tglx@linutronix.de>, Felipe Balbi <balbi@ti.com>
Subject: [PATCH 6/7] mfd: twl4030-irq: set irq nested flag
Date: Thu, 30 Jun 2011 12:51:09 +0300	[thread overview]
Message-ID: <1309427470-605-7-git-send-email-balbi@ti.com> (raw)
In-Reply-To: <1309427470-605-1-git-send-email-balbi@ti.com>

threads from twl4030's children will be called
nested in the context of the demultiplexing
handler on twl4030-irq.c.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/mfd/twl4030-irq.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
index 1b9ab2f..ff16e9c 100644
--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -304,7 +304,7 @@ static irqreturn_t handle_twl4030_pih(int irq, void *devid)
 			pih_isr;
 			pih_isr >>= 1, module_irq++) {
 		if (pih_isr & 0x1)
-			generic_handle_irq(module_irq);
+			handle_nested_irq(module_irq);
 	}
 
 	return IRQ_HANDLED;
@@ -596,9 +596,7 @@ static void handle_twl4030_sih(unsigned irq, struct irq_desc *desc)
 	int isr;
 
 	/* reading ISR acks the IRQs, using clear-on-read mode */
-	local_irq_enable();
 	isr = sih_read_isr(sih);
-	local_irq_disable();
 
 	if (isr < 0) {
 		pr_err("twl4030: %s SIH, read ISR error %d\n",
@@ -613,7 +611,7 @@ static void handle_twl4030_sih(unsigned irq, struct irq_desc *desc)
 		isr &= ~BIT(irq);
 
 		if (irq < sih->bits)
-			generic_handle_irq(agent->irq_base + irq);
+			handle_nested_irq(agent->irq_base + irq);
 		else
 			pr_err("twl4030: %s SIH, invalid ISR bit %d\n",
 				sih->name, irq);
@@ -720,6 +718,7 @@ int twl4030_init_irq(int irq_num, unsigned irq_base, unsigned irq_end)
 	for (i = irq_base; i < irq_end; i++) {
 		irq_set_chip_and_handler(i, &twl4030_irq_chip,
 					 handle_simple_irq);
+		irq_set_nested_thread(i, 1);
 		activate_irq(i);
 	}
 	twl4030_irq_next = i;
@@ -745,8 +744,10 @@ int twl4030_init_irq(int irq_num, unsigned irq_base, unsigned irq_end)
 fail_rqirq:
 	/* clean up twl4030_sih_setup */
 fail:
-	for (i = irq_base; i < irq_end; i++)
+	for (i = irq_base; i < irq_end; i++) {
+		irq_set_nested_thread(i, 0);
 		irq_set_chip_and_handler(i, NULL, NULL);
+	}
 
 	return status;
 }
-- 
1.7.6

  parent reply	other threads:[~2011-06-30  9:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-30  9:51 [PATCH 0/7] twl4030: finish threaded IRQ conversion Felipe Balbi
2011-06-30  9:51 ` [PATCH 1/7] mfd: twl4030-irq: remove trailing whitespaces Felipe Balbi
2011-06-30  9:51 ` [PATCH 2/7] mfd: twl4030-irq: implement bus_lock/bus_sync_unlock methods Felipe Balbi
2011-06-30  9:51 ` [PATCH 3/7] mfd: twl4030-irq: drop the kthread Felipe Balbi
2011-12-06 15:28   ` [regression] " Felipe Contreras
2011-12-07  6:51     ` Felipe Balbi
2011-12-07 11:04       ` Felipe Contreras
2011-12-07 11:30         ` NeilBrown
2011-12-07 18:32           ` Felipe Contreras
2011-12-07 13:39         ` Felipe Balbi
2011-12-07 13:59           ` Jarkko Nikula
2011-12-07 18:31             ` Felipe Contreras
2011-12-12 17:48   ` Felipe Contreras
2011-06-30  9:51 ` [PATCH 4/7] mfd: twl4030-irq: drop mask_work Felipe Balbi
2011-06-30  9:51 ` [PATCH 5/7] mfd: twl4030-irq: drop edge_work Felipe Balbi
2011-06-30  9:51 ` Felipe Balbi [this message]
2011-12-12 17:58   ` [PATCH 6/7] mfd: twl4030-irq: set irq nested flag Felipe Contreras
2011-06-30  9:51 ` [PATCH 7/7] rtc: twl: move to threaded irq Felipe Balbi
2011-07-09  4:09 ` [PATCH 0/7] twl4030: finish threaded IRQ conversion Mark Brown
2011-08-18 21:36   ` Felipe Balbi
2011-08-18 21:48     ` Felipe Balbi
2011-08-22 14:54     ` Samuel Ortiz
2011-08-22 18:04       ` Felipe Balbi

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=1309427470-605-7-git-send-email-balbi@ti.com \
    --to=balbi@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony@atomide.com \
    /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