1 /* $NetBSD: interrupts,v 1.1 1996/10/14 22:27:03 mark Exp $ */
4 * Copyright (c) 1996 Mark Brinicombe.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by Mark Brinicombe.
18 * 4. The name of the company nor the name of the author may be used to
19 * endorse or promote products derived from this software without specific
20 * prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
23 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 Ok since interrupts can be chained the return value from an interrupt
40 The following return values are defined :
42 -1 - interrupt may have been for us but not sure so pass it on
43 0 - interrupt no serviced (not ours)
44 interrupt serviced but pass on down the chain
45 1 - interrupt serviced do not pass on down the chain
47 The important bit is whether the interrupt should be passed on down
48 the chain of attached interrupt handlers.
50 For some interrupts and drivers where only a single device is
51 ever expected, the interrupt should be claimed if it has been serviced.
52 Passing it on down the chain may result in the stray interrupt handler
54 There are however some interrupt that should *always* be passed on down
55 the chain. These are interrupt which may commonly have multiple drivers
58 The following interrupts should always be passed on (return value of 0)
68 The following interrupts are recommended to be passed on
79 All other interrupts are not expected to be shared and may be claimed
80 when serviced. Stray IRQ handlers may or may not be attached to the end