public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Gary Thomas <gthomas@cambridge.redhat.com>
To: Jonathan Larmour <jlarmour@redhat.com>
Cc: ecos-discuss@sources.redhat.com, Robin Farine <acnrf@dial.eunet.ch>
Subject: Re: [ECOS] sa11x0 spurious interrupts
Date: Tue, 13 Feb 2001 09:56:00 -0000	[thread overview]
Message-ID: <XFMail.20010213105635.gthomas@cambridge.redhat.com> (raw)
In-Reply-To: <3A896C61.FD04D794@redhat.com>

On 13-Feb-2001 Jonathan Larmour wrote:
> Robin Farine wrote:
>> 
>> Hello,
>> 
>> While looking at the way the sa11x0 hal's routine 'hal_IRQ_handler()' decodes
>> interrupt sources, I noticed that when it does not find an interrupt source,
>> the routine returns CYGNUM_HAL_INTERRUPT_NONE, which equals to -1 for this
>> platform. However, the common ARM code in "vectors.S" assumes that a spurious
>> interrupt always have the vector #0. And worse, 'handle_IRQ_or_FIQ' will call
>> 'hal_interrupt_handlers[-1]' which contains 0 and thus reboot!
>> 
>> Did I miss something?
> 
> I don't think so. 0 can be a valid ISR. What's worse is that the default
> ISR in hal/common also returns 0 to indicate a spurious interrupt.

The default ISR handler returning 0 is a whole separate matter.

> 
> Anyone got any opinions why this isn't simply all wrong?

Actually, it does seem to be rather messed up.  It comes from having a large
number of ports and this particular behaviour is platform specific, thus 
we've somehow ended up with no less than 3 different answers here.

These should all be changed to return CYGNUM_HAL_INTERRUPT_NONE and have
the code in 'vectors.S' handle this as a special case.  However, what one
actually does when there is a spurious interrupt is tinder for a large
flame war :-)

  reply	other threads:[~2001-02-13  9:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-13  1:19 Robin Farine
2001-02-13  9:18 ` Jonathan Larmour
2001-02-13  9:56   ` Gary Thomas [this message]
2001-02-13 10:10     ` Jonathan Larmour
2001-02-13 10:13       ` Gary Thomas
2001-02-13 11:06         ` Robin Farine
2001-02-13 10:09   ` Robin Farine

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=XFMail.20010213105635.gthomas@cambridge.redhat.com \
    --to=gthomas@cambridge.redhat.com \
    --cc=acnrf@dial.eunet.ch \
    --cc=ecos-discuss@sources.redhat.com \
    --cc=jlarmour@redhat.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).