1*25bb985eSmacallan /* $NetBSD: intr.h,v 1.29 2018/09/27 17:34:28 macallan Exp $ */ 2abe9dea1Ssoren 3abe9dea1Ssoren /* 4abe9dea1Ssoren * Copyright (c) 2000 Soren S. Jorvang 5abe9dea1Ssoren * All rights reserved. 6abe9dea1Ssoren * 7abe9dea1Ssoren * Redistribution and use in source and binary forms, with or without 8abe9dea1Ssoren * modification, are permitted provided that the following conditions 9abe9dea1Ssoren * are met: 10abe9dea1Ssoren * 1. Redistributions of source code must retain the above copyright 11abe9dea1Ssoren * notice, this list of conditions and the following disclaimer. 12abe9dea1Ssoren * 2. Redistributions in binary form must reproduce the above copyright 13abe9dea1Ssoren * notice, this list of conditions and the following disclaimer in the 14abe9dea1Ssoren * documentation and/or other materials provided with the distribution. 15abe9dea1Ssoren * 3. All advertising materials mentioning features or use of this software 16abe9dea1Ssoren * must display the following acknowledgement: 17abe9dea1Ssoren * This product includes software developed for the 1807147999Skeihan * NetBSD Project. See http://www.NetBSD.org/ for 19abe9dea1Ssoren * information about NetBSD. 20abe9dea1Ssoren * 4. The name of the author may not be used to endorse or promote products 21abe9dea1Ssoren * derived from this software without specific prior written permission. 22abe9dea1Ssoren * 23abe9dea1Ssoren * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 24abe9dea1Ssoren * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 25abe9dea1Ssoren * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 26abe9dea1Ssoren * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 27abe9dea1Ssoren * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28abe9dea1Ssoren * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29abe9dea1Ssoren * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30abe9dea1Ssoren * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31abe9dea1Ssoren * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 32abe9dea1Ssoren * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33abe9dea1Ssoren */ 34abe9dea1Ssoren 3513f69bc5Sthorpej #ifndef _SGIMIPS_INTR_H_ 3613f69bc5Sthorpej #define _SGIMIPS_INTR_H_ 3713f69bc5Sthorpej 3823347d39Smatt #include <mips/intr.h> 39abe9dea1Ssoren 40abe9dea1Ssoren #ifdef _KERNEL 4123347d39Smatt #ifdef __INTR_PRIVATE 42abe9dea1Ssoren 4313f69bc5Sthorpej #include <sys/queue.h> 4413f69bc5Sthorpej #include <sys/types.h> 458e4e2fe0Suebayasi #include <sys/evcnt.h> 46abe9dea1Ssoren 4713f69bc5Sthorpej #define NINTR 32 4813f69bc5Sthorpej 493fe377a8Ssoren struct sgimips_intrhand { 5023347d39Smatt LIST_ENTRY(sgimips_intrhand) ih_q; 51ad76afdcSsekiya int (*ih_fun) (void *); 5213f69bc5Sthorpej void *ih_arg; 533fe377a8Ssoren struct sgimips_intr *ih_intrhead; 5479fdbacdSsekiya struct sgimips_intrhand *ih_next; 5513f69bc5Sthorpej int ih_pending; 56*25bb985eSmacallan struct evcnt ih_evcnt; 57*25bb985eSmacallan char ih_evname[8]; 5813f69bc5Sthorpej }; 5913f69bc5Sthorpej 603fe377a8Ssoren struct sgimips_intr { 6123347d39Smatt LIST_HEAD(,sgimips_intrhand) intr_q; 6213f69bc5Sthorpej unsigned long intr_ipl; 6313f69bc5Sthorpej }; 6413f69bc5Sthorpej 653fe377a8Ssoren extern struct sgimips_intrhand intrtab[]; 6613f69bc5Sthorpej 6723347d39Smatt #endif /* __INTR_PRIVATE */ 68abe9dea1Ssoren 6923347d39Smatt #ifndef _LOCORE 7023347d39Smatt void *cpu_intr_establish(int, int, int (*)(void *), void *); 7123347d39Smatt void mips1_fpu_intr(vaddr_t, uint32_t, uint32_t); 7223347d39Smatt #endif 733fe377a8Ssoren #endif /* !_KERNEL */ 7413f69bc5Sthorpej 7513f69bc5Sthorpej #endif /* !_SGIMIPS_INTR_H_ */ 76