2001-05-08 10:09:29 +04:00
|
|
|
/* $NetBSD: psl.h,v 1.18 2001/05/08 06:09:30 is Exp $ */
|
1994-10-26 05:01:24 +03:00
|
|
|
|
1994-04-10 06:28:14 +04:00
|
|
|
#ifndef _MACHINE_PSL_H_
|
|
|
|
#define _MACHINE_PSL_H_
|
1993-07-05 23:19:43 +04:00
|
|
|
|
1994-01-27 00:12:12 +03:00
|
|
|
#include <m68k/psl.h>
|
1994-04-10 06:06:32 +04:00
|
|
|
|
1996-04-22 01:13:16 +04:00
|
|
|
#if defined(_KERNEL) && !defined(_LOCORE)
|
|
|
|
|
2001-05-08 10:09:29 +04:00
|
|
|
#include "opt_lev6_defer.h"
|
|
|
|
|
1999-08-05 22:08:08 +04:00
|
|
|
#define spl0() _spl0() /* we have real software interrupts */
|
1996-04-22 01:13:16 +04:00
|
|
|
|
1999-08-05 22:08:08 +04:00
|
|
|
#define splnone() spl0()
|
|
|
|
#define spllowersoftclock() spl1()
|
1996-04-22 01:13:16 +04:00
|
|
|
|
1999-08-05 22:08:08 +04:00
|
|
|
#define splsoftclock() splraise1()
|
|
|
|
#define splsoftnet() splraise1()
|
|
|
|
#define splbio() splraise3()
|
|
|
|
#define splnet() splraise3()
|
1996-11-30 03:33:49 +03:00
|
|
|
|
|
|
|
/*
|
1998-04-11 22:28:33 +04:00
|
|
|
* splserial hack, idea by Jason Thorpe.
|
|
|
|
* drivers which need it (at the present only the coms) raise the variable to
|
1998-06-14 23:47:14 +04:00
|
|
|
* their serial interrupt level.
|
1996-11-30 03:33:49 +03:00
|
|
|
*
|
1998-04-11 22:28:33 +04:00
|
|
|
* serialspl is statically initialized in machdep.c at the moment; should
|
1996-11-30 03:33:49 +03:00
|
|
|
* be some driver independent file.
|
|
|
|
*
|
1998-04-11 22:28:33 +04:00
|
|
|
* XXX should serialspl be volatile? I think not; it is intended to be set only
|
1996-11-30 03:33:49 +03:00
|
|
|
* during xxx_attach() time, and will be used only later.
|
|
|
|
* -is
|
|
|
|
*/
|
|
|
|
|
1998-04-11 22:28:33 +04:00
|
|
|
extern u_int16_t amiga_serialspl;
|
1999-08-05 22:08:08 +04:00
|
|
|
#define splserial() _splraise(amiga_serialspl)
|
|
|
|
#define spltty() splraise4()
|
2001-04-14 03:29:55 +04:00
|
|
|
#define splvm() splraise4()
|
1996-11-30 03:33:49 +03:00
|
|
|
|
1996-04-22 01:13:16 +04:00
|
|
|
#ifndef LEV6_DEFER
|
1999-08-05 22:08:08 +04:00
|
|
|
#define splclock() splraise6()
|
|
|
|
#define splstatclock() splraise6()
|
1996-04-22 01:13:16 +04:00
|
|
|
#define splhigh() spl7()
|
|
|
|
#define splsched() spl7()
|
2000-08-22 23:46:26 +04:00
|
|
|
#define spllock() spl7()
|
1996-04-22 01:13:16 +04:00
|
|
|
#else
|
1999-08-05 22:08:08 +04:00
|
|
|
#define splclock() splraise4()
|
|
|
|
#define splstatclock() splraise4()
|
|
|
|
#define splhigh() splraise4()
|
|
|
|
#define splsched() splraise4()
|
2000-08-22 23:46:26 +04:00
|
|
|
#define spllock() splraise4()
|
1994-04-10 06:06:32 +04:00
|
|
|
#endif
|
1996-04-22 01:13:16 +04:00
|
|
|
|
1999-08-05 22:08:08 +04:00
|
|
|
#define splx(s) _spl(s)
|
1996-04-22 01:13:16 +04:00
|
|
|
|
|
|
|
#endif /* KERNEL && !_LOCORE */
|
|
|
|
#endif /* _MACHINE_PSL_H_ */
|