linux-mips-fnet
[Top] [All Lists]

Re: Interrupts during interrupts, masking and unmasking

To: "Bradley D. LaRonde" <brad@ltc.com>
Subject: Re: Interrupts during interrupts, masking and unmasking
From: Ralf Baechle <ralf@uni-koblenz.de>
Date: Wed, 29 Sep 1999 23:49:06 +0200
Cc: linux-mips@fnet.fr, linuxce-devel@linuxce.org
In-reply-to: <018f01bf0a84$1cf4cf70$b8119526@ltc.com>; from Bradley D. LaRonde on Wed, Sep 29, 1999 at 10:08:32AM -0400
References: <018f01bf0a84$1cf4cf70$b8119526@ltc.com>
On Wed, Sep 29, 1999 at 10:08:32AM -0400, Bradley D. LaRonde wrote:

> I'm having trouble with interrupts that occur during interrupts.  I'm
> working on the Vr41xx port.
> 
> First, there was this problem that we would lose the timer irq click.  It
> just stopped clicking.  /proc/interrupts showed no increase for timer.  It
> happend when we pushed lots of data through the serial port.  Mike had an
> idea that it might be because of interrupts occurring during other
> interrupts.
> 
> But why did the timer irq stop clicking?  I could still use the console
> w/keyboard on my Clio.  cat /proc/interrupts showed the other irqs clicking,
> but not timer.  It was like the timer irq was getting masked.
> 
> Hmmmm... I poked around and saw irq.c masking and unmasking in do_IRQ.  I
> looked at i386 and couldn't find a similar operation.  So I commented them
> out to see if that would fix the mysterious lost timer problem.  It did!
> Cool.  I figured the Vr is just finicky and doesn't like to be messed around
> with masking/unmasking so much.
> 
> But... now a new problem. If all my interrupts are set for SA_INTERRUPT, no
> problem.  If I have one that isn't SA_INTERRUPT, problem, since that lets
> do_IRQ do __sti.
> 
> I wonder - if an interrupt occurs inside do_IRQ, what happens?  Does it come
> back to do_IRQ when it's finished?  It should, right?  But if it didn't, it
> could have left the timer masked.
> 
> I'm also thinking "maybe there is some mips thing going on here".

When the second interrupt is entered, make sure that it's stack pointer
is loaded correctly.  It should the same as for the first one minus a few
bytes for stackframe and other crappola.

What is the source of your timer interrupt?  Is it the internal cycle
counter?

  Ralf

<Prev in Thread] Current Thread [Next in Thread>