From: Matt Porter <porter@cox.net>
To: Hollis Blanchard <hollis@austin.ibm.com>
Cc: devel list <linuxppc-dev@lists.linuxppc.org>
Subject: Re: ppc_irq_dispatch_handler and unhandled interrupts
Date: Thu, 21 Nov 2002 11:25:40 -0700 [thread overview]
Message-ID: <20021121112540.A8766@home.com> (raw)
In-Reply-To: <1037897936.10521.89.camel@granite.austin.ibm.com>; from hollis@austin.ibm.com on Thu, Nov 21, 2002 at 10:58:55AM -0600
On Thu, Nov 21, 2002 at 10:58:55AM -0600, Hollis Blanchard wrote:
> Here's the failure mode:
> On a 405LP (using ppc405_pic), an irq is becoming unmasked[1] (in
> UIC0_ER). ppc_irq_dispatch_handler sees irq_desc[0].action == NULL, and
> correctly complains of an unhandled interrupt and masks it off. However
> at the end of the same function (label "out"), the irq is unmasked again
> because irq_desc[0].handler == ppc405_pic (irq_desc[0..NR_IRQS] =
> ppc405_pic; see ppc4xx_init_IRQ() ). So the irq is unmasked, occurs
> again, is masked, is unmasked, occurs again...
>
> The attached patch fixes the problem by checking desc->action as well as
> desc->handler - there is no sense unmasking an interrupt if we already
> know there are no drivers ready to handle it.
>
> [1] In my particular case, UIC0_ER is being modified by BIOS when waking
> from sleep (the BIOS later returns control to Linux), which could be
> worked around in wakeup code. However in the interest of handling as
> many unexpected hardware and software errors as possible, I believe this
> patch should be applied.
As I mentioned on IRC, I think this is a Good Thing(tm). This cleanly
handles the case where somebody leaves an unhooked interrupt unmasked.
It's another good example of hardening the kernel by handling error
conditions smartly. Unless anybody has serious objections to this
additional check, I'd like to push it in.
Regards,
--
Matt Porter
porter@cox.net
This is Linux Country. On a quiet night, you can hear Windows reboot.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2002-11-21 18:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-21 16:58 ppc_irq_dispatch_handler and unhandled interrupts Hollis Blanchard
2002-11-21 18:25 ` Matt Porter [this message]
2002-11-22 22:45 ` Paul Mackerras
2002-11-25 22:04 ` Hollis Blanchard
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=20021121112540.A8766@home.com \
--to=porter@cox.net \
--cc=hollis@austin.ibm.com \
--cc=linuxppc-dev@lists.linuxppc.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;
as well as URLs for NNTP newsgroup(s).