public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Shmulik Ladkani <shmulik.ladkani@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@elte.hu, tglx@linutronix.de, damm@igel.co.jp,
	peterz@infradead.org, ddaney@caviumnetworks.com
Subject: [PATCH] kernel/irq: Reset IRQ desc->depth to 1 when __free_irq disables the line
Date: Tue, 12 Jan 2010 09:41:47 +0200	[thread overview]
Message-ID: <4b4c27f2.0506d00a.3dcb.2f78@mx.google.com> (raw)
In-Reply-To: <4b4ae343.09a8100a.3b72.ffffda1b@mx.google.com>

Reset irq_desc's depth field to 1, indicating IRQ line is disabled, when
__free_irq disables/shuts-down the line (i.e. upon unregistration of
last interrupt handler).

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
---
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index eb6078c..642a98c 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -877,6 +877,7 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)
 
 	/* If this was the last handler, shut down the IRQ line: */
 	if (!desc->action) {
+		desc->depth = 1;
 		desc->status |= IRQ_DISABLED;
 		if (desc->chip->shutdown)
 			desc->chip->shutdown(irq);
-- 
Shmulik Ladkani

      reply	other threads:[~2010-01-12  7:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11  8:36 kernel/irq: __setup_irq/__free_irq disable-depth asymmetry? Shmulik Ladkani
2010-01-12  7:41 ` Shmulik Ladkani [this message]

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=4b4c27f2.0506d00a.3dcb.2f78@mx.google.com \
    --to=shmulik.ladkani@gmail.com \
    --cc=damm@igel.co.jp \
    --cc=ddaney@caviumnetworks.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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