xref: /netbsd-src/sys/arch/atari/include/mtpr.h (revision 9b6bd2d968e3623e57a9a376b7fc0ae125709789)
1*9b6bd2d9Srmind /*	$NetBSD: mtpr.h,v 1.8 2011/02/08 20:20:10 rmind Exp $	*/
28b0113cfSleo 
38b0113cfSleo /*
4*9b6bd2d9Srmind  * Copyright (c) 1988 University of Utah.
58b0113cfSleo  * Copyright (c) 1990 The Regents of the University of California.
68b0113cfSleo  * All rights reserved.
78b0113cfSleo  *
88b0113cfSleo  * This code is derived from software contributed to Berkeley by
98b0113cfSleo  * the Systems Programming Group of the University of Utah Computer
108b0113cfSleo  * Science Department.
118b0113cfSleo  *
128b0113cfSleo  * Redistribution and use in source and binary forms, with or without
138b0113cfSleo  * modification, are permitted provided that the following conditions
148b0113cfSleo  * are met:
158b0113cfSleo  * 1. Redistributions of source code must retain the above copyright
168b0113cfSleo  *    notice, this list of conditions and the following disclaimer.
178b0113cfSleo  * 2. Redistributions in binary form must reproduce the above copyright
188b0113cfSleo  *    notice, this list of conditions and the following disclaimer in the
198b0113cfSleo  *    documentation and/or other materials provided with the distribution.
20aad01611Sagc  * 3. Neither the name of the University nor the names of its contributors
21aad01611Sagc  *    may be used to endorse or promote products derived from this software
22aad01611Sagc  *    without specific prior written permission.
23aad01611Sagc  *
24aad01611Sagc  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25aad01611Sagc  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26aad01611Sagc  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27aad01611Sagc  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28aad01611Sagc  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29aad01611Sagc  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30aad01611Sagc  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31aad01611Sagc  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32aad01611Sagc  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33aad01611Sagc  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34aad01611Sagc  * SUCH DAMAGE.
35aad01611Sagc  *
36aad01611Sagc  * from: Utah $Hdr: mtpr.h 1.1 90/07/09$
37aad01611Sagc  *
38aad01611Sagc  *	@(#)mtpr.h	7.2 (Berkeley) 11/3/90
39aad01611Sagc  */
408b0113cfSleo 
41fb4939edSleo #ifndef _MACHINE_MTPR_H_
42fb4939edSleo #define _MACHINE_MTPR_H_
43fb4939edSleo 
44fb4939edSleo #ifdef _KERNEL
458b0113cfSleo 
461babc14dSleo #include <m68k/asm_single.h>
478b0113cfSleo /*
488b0113cfSleo  * simulated software interrupt register
498b0113cfSleo  */
508b0113cfSleo 
51ec3f2031Sleo extern volatile unsigned char ssir;
528b0113cfSleo 
53fb4939edSleo #define SIR_NET		0x1	/* call netintr()		*/
54fb4939edSleo #define SIR_CLOCK	0x2	/* call softclock()		*/
55fb4939edSleo #define	SIR_CBACK	0x4	/* walk the sicallback-chain	*/
568b0113cfSleo 
571babc14dSleo #define siron(x)	single_inst_bset_b((ssir), (x))
581babc14dSleo #define	siroff(x)	single_inst_bclr_b((ssir), (x))
598b0113cfSleo 
6057134026Sleo #define setsoftnet()	siron(SIR_NET)
6157134026Sleo #define setsoftclock()	siron(SIR_CLOCK)
6257134026Sleo #define setsoftcback()	siron(SIR_CBACK)
63fb4939edSleo 
64fb4939edSleo #endif /* _KERNEL */
65fb4939edSleo 
66fb4939edSleo #endif /* !_MACHINE_MTPR_H_ */
67