16fc729afSOlivier Houchard /* $NetBSD: psl.h,v 1.6 2003/06/16 20:00:58 thorpej Exp $ */ 26fc729afSOlivier Houchard 3d8315c79SWarner Losh /*- 4af3dc4a7SPedro F. Giffuni * SPDX-License-Identifier: BSD-4-Clause 5af3dc4a7SPedro F. Giffuni * 66fc729afSOlivier Houchard * Copyright (c) 1995 Mark Brinicombe. 76fc729afSOlivier Houchard * All rights reserved. 86fc729afSOlivier Houchard * 96fc729afSOlivier Houchard * Redistribution and use in source and binary forms, with or without 106fc729afSOlivier Houchard * modification, are permitted provided that the following conditions 116fc729afSOlivier Houchard * are met: 126fc729afSOlivier Houchard * 1. Redistributions of source code must retain the above copyright 136fc729afSOlivier Houchard * notice, this list of conditions and the following disclaimer. 146fc729afSOlivier Houchard * 2. Redistributions in binary form must reproduce the above copyright 156fc729afSOlivier Houchard * notice, this list of conditions and the following disclaimer in the 166fc729afSOlivier Houchard * documentation and/or other materials provided with the distribution. 176fc729afSOlivier Houchard * 3. All advertising materials mentioning features or use of this software 186fc729afSOlivier Houchard * must display the following acknowledgement: 196fc729afSOlivier Houchard * This product includes software developed by Mark Brinicombe 206fc729afSOlivier Houchard * for the NetBSD Project. 216fc729afSOlivier Houchard * 4. The name of the company nor the name of the author may be used to 226fc729afSOlivier Houchard * endorse or promote products derived from this software without specific 236fc729afSOlivier Houchard * prior written permission. 246fc729afSOlivier Houchard * 256fc729afSOlivier Houchard * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 266fc729afSOlivier Houchard * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 276fc729afSOlivier Houchard * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 286fc729afSOlivier Houchard * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 296fc729afSOlivier Houchard * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 306fc729afSOlivier Houchard * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 316fc729afSOlivier Houchard * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 326fc729afSOlivier Houchard * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 336fc729afSOlivier Houchard * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 346fc729afSOlivier Houchard * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 356fc729afSOlivier Houchard * SUCH DAMAGE. 366fc729afSOlivier Houchard * 376fc729afSOlivier Houchard * RiscBSD kernel project 386fc729afSOlivier Houchard * 396fc729afSOlivier Houchard * psl.h 406fc729afSOlivier Houchard * 416fc729afSOlivier Houchard * spl prototypes. 426fc729afSOlivier Houchard * Eventually this will become a set of defines. 436fc729afSOlivier Houchard * 446fc729afSOlivier Houchard * Created : 21/07/95 456fc729afSOlivier Houchard */ 466fc729afSOlivier Houchard 476fc729afSOlivier Houchard #ifndef _MACHINE_PSL_H_ 486fc729afSOlivier Houchard #define _MACHINE_PSL_H_ 496fc729afSOlivier Houchard 506fc729afSOlivier Houchard /* 516fc729afSOlivier Houchard * These are the different SPL states 526fc729afSOlivier Houchard * 536fc729afSOlivier Houchard * Each state has an interrupt mask associated with it which 546fc729afSOlivier Houchard * indicate which interrupts are allowed. 556fc729afSOlivier Houchard */ 566fc729afSOlivier Houchard 576fc729afSOlivier Houchard #define _SPL_0 0 586fc729afSOlivier Houchard #define _SPL_SOFTCLOCK 1 596fc729afSOlivier Houchard #define _SPL_SOFTNET 2 606fc729afSOlivier Houchard #define _SPL_BIO 3 616fc729afSOlivier Houchard #define _SPL_NET 4 626fc729afSOlivier Houchard #define _SPL_SOFTSERIAL 5 636fc729afSOlivier Houchard #define _SPL_TTY 6 646fc729afSOlivier Houchard #define _SPL_VM 7 656fc729afSOlivier Houchard #define _SPL_AUDIO 8 666fc729afSOlivier Houchard #define _SPL_CLOCK 9 676fc729afSOlivier Houchard #define _SPL_STATCLOCK 10 686fc729afSOlivier Houchard #define _SPL_HIGH 11 696fc729afSOlivier Houchard #define _SPL_SERIAL 12 706fc729afSOlivier Houchard #define _SPL_LEVELS 13 716fc729afSOlivier Houchard 726fc729afSOlivier Houchard #ifdef _KERNEL 736fc729afSOlivier Houchard #ifndef _LOCORE 746fc729afSOlivier Houchard extern int current_spl_level; 756fc729afSOlivier Houchard 766fc729afSOlivier Houchard extern u_int spl_masks[_SPL_LEVELS + 1]; 776fc729afSOlivier Houchard extern u_int spl_smasks[_SPL_LEVELS]; 786fc729afSOlivier Houchard #endif /* _LOCORE */ 796fc729afSOlivier Houchard #endif /* _KERNEL */ 806fc729afSOlivier Houchard 816fc729afSOlivier Houchard #endif /* _ARM_PSL_H_ */ 826fc729afSOlivier Houchard /* End of psl.h */ 83