All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Jan Marek <linux@hazard.jcu.cz>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Cannot unlock spinlock... Was: Problem in yenta.c, 2nd edition
Date: Tue, 06 Nov 2001 22:40:49 +0000	[thread overview]
Message-ID: <23001.1005086449@redhat.com> (raw)
In-Reply-To: <20011106123427.A11351@hazard.jcu.cz>
In-Reply-To: <20011106123427.A11351@hazard.jcu.cz>  <3BE2D37A.D32C6DB1@zip.com.au> <20011105112900.C5919@hazard.jcu.cz>


linux@hazard.jcu.cz said:
>  The last message I got from kernel is:  request_irq: desc->handler->
> startup(irq)

> Then problem is in the spin_unlock_irqrestore()???

> Any ideas, recomendations, suggestions?

It's dying in an IRQ storm. Something is permanently asserting IRQ 11, and 
unless you can work out what's doing it and make it stop, the machine will 
die whenever you enable that IRQ.

Try this hack, just to make sure:

Index: arch/i386/kernel/irq.c
===================================================================
RCS file: /inst/cvs/linux/arch/i386/kernel/irq.c,v
retrieving revision 1.4.2.29
diff -u -r1.4.2.29 irq.c
--- arch/i386/kernel/irq.c	2001/06/21 09:33:54	1.4.2.29
+++ arch/i386/kernel/irq.c	2001/08/15 16:50:01
@@ -552,6 +552,8 @@
 	spin_unlock_irqrestore(&desc->lock, flags);
 }
 
+static unsigned int stormcount[NR_IRQS];
+
 /*
  * do_IRQ handles all normal device IRQ's (the special
  * SMP cross-CPU interrupts have their own specific
@@ -576,6 +578,15 @@
 	unsigned int status;
 
 	kstat.irqs[cpu][irq]++;
+	if (++stormcount[irq] > 200) {
+		printk(KERN_CRIT "IRQ storm detected on IRQ %d. Disabling\n", irq);
+		disable_irq(irq);
+	}
+	if(irq==0) {
+		int i; 
+		for (i=0; i<NR_IRQS; i++)
+			stormcount[i] = 0;
+	}
 	spin_lock(&desc->lock);
 	desc->handler->ack(irq);
 	/*




--
dwmw2



  parent reply	other threads:[~2001-11-06 22:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3BE2D37A.D32C6DB1@zip.com.au>
2001-11-05 10:29 ` [Fwd: Re: Problem in yenta.c, 2nd edition] Jan Marek
2001-11-06 11:34   ` Cannot unlock spinlock... Was: Problem in yenta.c, 2nd edition Jan Marek
2001-11-06 22:40   ` David Woodhouse [this message]
2001-11-07  9:40     ` Jan Marek
2001-11-07  9:59     ` David Woodhouse
2001-11-07 10:07       ` Jan Marek
2001-11-07 10:10         ` Jan Marek
2001-11-07 10:30           ` Alan Cox
2001-11-07 10:29             ` David Woodhouse
2001-11-07 10:47               ` Alan Cox
2001-11-07 10:55             ` Jan Marek
2001-11-07 15:04               ` Doug McNaught

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=23001.1005086449@redhat.com \
    --to=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@hazard.jcu.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.