From: Richard Hirst <rhirst@linuxcare.com>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Grant Grundler <grundler@puffin.external.hp.com>,
John Marvin <jsm@udlkern.fc.hp.com>,
parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] kernel panic
Date: Thu, 24 May 2001 15:16:14 +0100 [thread overview]
Message-ID: <20010524151614.X8736@linuxcare.com> (raw)
In-Reply-To: <20010523201317.X23718@parcelfarce.linux.theplanet.co.uk>; from matthew@wil.cx on Wed, May 23, 2001 at 08:13:17PM +0100
On Wed, May 23, 2001 at 08:13:17PM +0100, Matthew Wilcox wrote:
> On Wed, May 23, 2001 at 12:59:57PM -0600, Grant Grundler wrote:
> > Exactly. But if the driver is mucking with IRQ enable/disable,
> > does that mean the enable/disable code has to keep reference counts?
> > Don't recall any archs doing that when we did the initial implementation.
>
> cli -> disables irqs on all processors
> __cli -> disables irqs on local processor
> sti -> enables irqs on all processors
> __sti -> enable irqs on local processor
>
> spin_lock_irqsave -> disables interrupts locally, puts the previous
> state into the state variable you supplied and acquires the spinlock
> spin_lock_irqrestore -> releases the spinlock and restores previous
> state from state variable
>
> no need to keep enable/disable counts, the previous state gets stored
> for you. if you're using cli and sti inappropriately, you lose.
You mean like scsi_request_fn() calling spin_unlock_irq(&io_request_lock);
when called at interrupt level?
> OK, the problem is that you are getting into a interrupt loop.
> I see the following repeated sequence on the stack:
>
> intr_extint <-----------+
> do_irq_mask |
> do_irq |
> dino_isr |
> sym53c8xx_intr |
> scsi_old_done |
> rw_intr |
> scsi_io_completion |
> __scsi_end_request |
> scsi_queue_next_request |
> scsi_request_fn | <<<< re-enables interrupts
> scsi_dispatch_cmd |
> <NEXT INTERRUPT> >-----------+
I also found
spin_lock(&lock) can also be used in your interrupt handler if your
device only uses one interrupt: the kernel guarantees that a interrupt
handler is never reentered, even if the interrupt handler runs with
enabled interrupts.
in <http://kt.zork.net/kernel-traffic/kt20000703_74.txt>
Richard
next prev parent reply other threads:[~2001-05-24 14:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-23 8:53 [parisc-linux] kernel panic John Marvin
2001-05-23 16:21 ` Matthew Wilcox
2001-05-23 18:59 ` Grant Grundler
2001-05-23 19:13 ` Matthew Wilcox
2001-05-24 14:16 ` Richard Hirst [this message]
2001-05-25 4:31 ` Grant Grundler
-- strict thread matches above, loose matches on Subject: below --
2002-09-07 20:46 [parisc-linux] Kernel Panic marc
2002-09-07 22:08 ` Grant Grundler
2002-09-02 16:37 marc
2002-09-02 16:51 ` Randolph Chung
2001-05-22 8:10 [parisc-linux] kernel panic John Marvin
2001-05-23 2:18 ` Ryan Bradetich
2001-05-23 16:48 ` Stan Sieler
2001-05-22 3:57 Ryan Bradetich
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=20010524151614.X8736@linuxcare.com \
--to=rhirst@linuxcare.com \
--cc=grundler@puffin.external.hp.com \
--cc=jsm@udlkern.fc.hp.com \
--cc=matthew@wil.cx \
--cc=parisc-linux@lists.parisc-linux.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 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.