From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robin Farine To: ecos-discuss@sources.redhat.com Subject: Re: [ECOS] sa11x0 spurious interrupts Date: Tue, 13 Feb 2001 10:09:00 -0000 Message-id: <86bss61moj.fsf@halftrack.hq.acn-group.ch> References: <867l2vuel3.fsf@halftrack.hq.acn-group.ch> <3A896C61.FD04D794@redhat.com> X-SW-Source: 2001-02/msg00207.html Jonathan Larmour writes: > 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. > > Anyone got any opinions why this isn't simply all wrong? I think that the sa11x0 'hal_IRQ_handler()' routine does the right thing (returning -1) and that "vector.S" should in any case check that the vector returned is in range and if not, call the spurious interrupt handler if the configuration requested it. Robin