The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Andrew Morton <akpm@osdl.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Russell King <rmk+lkml@arm.linux.org.uk>
Subject: [patch 2/2] genirq: Add reentrancy warning messages
Date: Sat, 10 Jun 2006 10:15:12 -0000	[thread overview]
Message-ID: <20060610085435.599849000@cruncher.tec.linutronix.de> (raw)
In-Reply-To: 20060610085428.366868000@cruncher.tec.linutronix.de

[-- Attachment #1: genirq-add-reentrancy-messages.patch --]
[-- Type: text/plain, Size: 1554 bytes --]


The simple and level irq handlers prevent reentrancy. For those irq types
reentrancy should not happen. Instead of silently going back omit a warning
message. Also do not reenable the interrupt in that case.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

 kernel/irq/chip.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Index: linux-2.6.17-rc6-mm/kernel/irq/chip.c
===================================================================
--- linux-2.6.17-rc6-mm.orig/kernel/irq/chip.c	2006-06-10 10:32:49.000000000 +0200
+++ linux-2.6.17-rc6-mm/kernel/irq/chip.c	2006-06-10 10:42:40.000000000 +0200
@@ -208,8 +208,11 @@
 
 	spin_lock(&desc->lock);
 
-	if (unlikely(desc->status & IRQ_INPROGRESS))
+	if (unlikely(desc->status & IRQ_INPROGRESS)) {
+		printk(KERN_ERR "handle_simple_irq reentered while "
+		       "processing irq %d\n", irq);
 		goto out_unlock;
+	}
 	desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
 	kstat_cpu(cpu).irqs[irq]++;
 
@@ -251,8 +254,11 @@
 	spin_lock(&desc->lock);
 	mask_ack_irq(desc, irq);
 
-	if (unlikely(desc->status & IRQ_INPROGRESS))
+	if (unlikely(desc->status & IRQ_INPROGRESS)) {
+		printk(KERN_ERR "handle_level_irq reentered while "
+		       "processing irq %d\n", irq);
 		goto out;
+	}
 	desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
 	kstat_cpu(cpu).irqs[irq]++;
 
@@ -273,9 +279,9 @@
 
 	spin_lock(&desc->lock);
 	desc->status &= ~IRQ_INPROGRESS;
-out:
 	if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
 		desc->chip->unmask(irq);
+out:
 	spin_unlock(&desc->lock);
 }
 

--


      parent reply	other threads:[~2006-06-10 10:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-10 10:15 [patch 0/2] genirq updates Thomas Gleixner
2006-06-10 10:15 ` [patch 1/2] genirq: allow usage of no_irq_chip Thomas Gleixner
2006-06-21 23:12   ` Andrew Morton
2006-06-22  8:35     ` Russell King
2006-06-22  8:51       ` Thomas Gleixner
2006-06-22 19:55         ` Thomas Gleixner
2006-06-10 10:15 ` Thomas Gleixner [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=20060610085435.599849000@cruncher.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rmk+lkml@arm.linux.org.uk \
    /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