From: "Richard B. Johnson" <root@chaos.analogic.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: Robert_Hentosh@Dell.com, Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: spurious 8259A interrupt
Date: Fri, 19 Mar 2004 08:48:28 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.53.0403190825070.929@chaos> (raw)
In-Reply-To: <20040319130609.GE2650@mail.shareable.org>
On Fri, 19 Mar 2004, Jamie Lokier wrote:
> Robert_Hentosh@Dell.com wrote:
> > > IRQ10 asserted
> > > INTACK cycle lets PIC deliver vector to processor
> > > processor masks IRQ10 in PIC
> > > processor sends EOI command to PIC
> > > processor reads a status register in the NIC, which causes IRQ10 to be
> > > deasserted
> > > processor unmasks IRQ10 in PIC
>
> > The PIC defaults to IRQ7 because of its design, when IRQ10 was already
> > cleared. Sticking delays in is not viable in a generic ISR routing. A
> > possible fix to this issue would be to issue the EOI after the read to
> > the status register on the NIC, and I see some documentation on the PIC
> > that actually suggests that this is the way to service an interrupt.
> > This seemed like a risky change, since sending the EOI and using the
> > mask has been in use for some time and the change would effect all
> > devices using interrupts.
>
> That reminds me: why does Linux mask the IRQ anyway?
>
> Why doesn't it simply call the handler functions, and then send EOI to
> the PIC with no unmasking?
>
> For those rare occasions when an interrupt handler wants to re-enable
> interrupts (sti), _then_ it could mask the interrupt that called the handler.
>
> Why wouldn't that work?
It would work. However, the driver would then have to "know"
if the interrupt came from IO-APIC or from the 8259. It also
would have to "know" what IRQ it was actually using, etc.,
not just at configuration time, but forever. So, all the
dirty details were put in the kernel code so that the
ISR only needs to know it was called as a result of an
interrupt.
There is no problem with masking ON/OFF the interrupt
input to the 8259, In fact, this can be used to generate
another (unreliable) edge if the IRQ line is still asserted.
The IRQ7 spurious is usually an artifact of a crappy motherboard
design where the CPU "thinks" it was interrupted, but the
controller didn't wiggle the CPUs INT line. Once the INT
cycle starts, it must complete or the CPU would hang forever
waiting for the vector. Therefore, if the controller gets
the vector request from the CPU and it didn't actually interrupt,
the controller puts the IRQ7 vector on the bus, that ISR gets
called, and you get a "spurious interrupt". If you are
looking at the programming of the 8259, you are looking in
the wrong place. You need to look at the hardware timing on
the motherboard. That's where the problem originates. The
8259 is just doing its job, keeping the CPU running after
this spurious event.
FYI, the motherboards in the cheapie Dell machines we have
been getting (Optiplex GX260) are attrocious in this respect.
To prevent the error logs from getting filled up with
the "Spurious interrupt" messages, they need to be commented
out in kernels that run on these machines. Otherwise, we
get such messages about 50 or 60 times per hour. I note
that the original question came from somebody at Dell. They
really need to check their own back-yard before investigating
software.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.
next prev parent reply other threads:[~2004-03-19 13:46 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-16 20:32 Robert_Hentosh
2004-03-19 13:06 ` Jamie Lokier
2004-03-19 13:16 ` Russell King
2004-03-19 13:39 ` Jamie Lokier
2004-03-19 14:04 ` Anton Blanchard
2004-03-19 14:56 ` Jamie Lokier
2004-03-19 13:48 ` Richard B. Johnson [this message]
2004-03-19 14:39 ` Jamie Lokier
2004-03-21 17:58 ` Hans-Peter Jansen
2004-03-22 9:12 ` Maciej W. Rozycki
2004-03-22 12:29 ` Richard B. Johnson
2004-03-24 15:28 ` Jamie Lokier
2004-03-24 15:50 ` Gabriel Paubert
2004-03-24 15:57 ` Richard B. Johnson
2004-03-19 13:28 ` Maciej W. Rozycki
2004-03-19 22:01 ` Guennadi Liakhovetski
2004-03-22 9:02 ` Maciej W. Rozycki
2004-03-22 21:16 ` Guennadi Liakhovetski
2004-03-22 22:13 ` Richard B. Johnson
2004-03-22 23:09 ` Guennadi Liakhovetski
2004-03-22 23:38 ` Richard B. Johnson
2004-03-23 10:32 ` Maciej W. Rozycki
2004-03-23 10:42 ` Maciej W. Rozycki
2004-03-23 21:10 ` Guennadi Liakhovetski
2004-03-23 10:29 ` Maciej W. Rozycki
2004-03-23 10:26 ` Maciej W. Rozycki
-- strict thread matches above, loose matches on Subject: below --
2004-03-16 18:35 Emmanuel Fleury
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=Pine.LNX.4.53.0403190825070.929@chaos \
--to=root@chaos.analogic.com \
--cc=Robert_Hentosh@Dell.com \
--cc=jamie@shareable.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®