diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-05-02 06:44:48 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-05-02 06:44:48 +0000 |
commit | a1ab0133973a053ec8cb7034b5f525c772d2c6d6 (patch) | |
tree | 348052b6165a33d50f05b52e0989ec9095b81452 /sys/arch/amiga/include/param.h | |
parent | 357d854e83a35ee1bdb134546c9f0e8b086a8833 (diff) |
Sync with NetBSD 9600430. The port has gone over a major -Wall treat
Diffstat (limited to 'sys/arch/amiga/include/param.h')
-rw-r--r-- | sys/arch/amiga/include/param.h | 113 |
1 files changed, 7 insertions, 106 deletions
diff --git a/sys/arch/amiga/include/param.h b/sys/arch/amiga/include/param.h index dd7bef3737c..a7172d18c77 100644 --- a/sys/arch/amiga/include/param.h +++ b/sys/arch/amiga/include/param.h @@ -1,5 +1,5 @@ -/* $OpenBSD: param.h,v 1.5 1996/03/30 22:18:27 niklas Exp $ */ -/* $NetBSD: param.h,v 1.28 1996/03/04 05:04:14 cgd Exp $ */ +/* $OpenBSD: param.h,v 1.6 1996/05/02 06:44:45 niklas Exp $ */ +/* $NetBSD: param.h,v 1.29 1996/04/21 21:13:20 veego Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -97,8 +97,8 @@ * of the hardware page size. */ #define MSIZE 128 /* size of an mbuf */ -#define MCLBYTES 1024 -#define MCLSHIFT 10 +#define MCLSHIFT 11 +#define MCLBYTES (1 << MCLSHIFT) #define MCLOFSET (MCLBYTES - 1) #ifndef NMBCLUSTERS #ifdef GATEWAY @@ -145,110 +145,11 @@ #define amiga_btop(x) ((unsigned)(x) >> PGSHIFT) #define amiga_ptob(x) ((unsigned)(x) << PGSHIFT) -/* - * spl functions; all are normally done in-line - */ -#include <machine/psl.h> - #ifdef _KERNEL - -static __inline int -splraise(npsl) - register int npsl; -{ - register int opsl; - - __asm __volatile ("clrl %0; movew sr,%0; movew %1,sr" : "&=d" (opsl) : - "di" (npsl)); - return opsl; -} - -#ifdef IPL_REMAP_1 - -extern int isr_exter_ipl; -extern void walk_ipls __P((int, int)); - -static __inline int -splx(npsl) - register int npsl; -{ - register int opsl; - - __asm __volatile ("clrl %0; movew sr,%0" : "=d" (opsl)); - if ((isr_exter_ipl << 8) > (npsl & PSL_IPL)) - walk_ipls(isr_exter_ipl, npsl); - __asm __volatile("movew %0,sr" : : "di" (npsl)); - return opsl; -} +#ifndef _LOCORE +void delay __P((u_int)); +void DELAY __P((u_int)); #endif - -#ifndef IPL_REMAP_2 -#define splx splraise -#else - -extern int walk_ipls __P((int)); - -static __inline int -splx(npsl) - register int npsl; -{ - register int opsl; - - /* We should maybe have a flag telling if this is needed. */ - opsl = walk_ipls(npsl); - __asm __volatile("movew %0,sr" : : "di" (npsl)); - return opsl; -} - -#endif - -/* - * Shortcuts - */ -#define spl1() splraise(PSL_S|PSL_IPL1) -#define spl2() splraise(PSL_S|PSL_IPL2) -#define spl3() splraise(PSL_S|PSL_IPL3) -#define spl4() splraise(PSL_S|PSL_IPL4) -#define spl5() splraise(PSL_S|PSL_IPL5) -#define spl6() splraise(PSL_S|PSL_IPL6) -#define spl7() splraise(PSL_S|PSL_IPL7) - -/* - * Hardware interrupt masks - */ -#define splbio() spl3() -#define splnet() spl3() -#define spltty() spl4() -#define splimp() spl4() -#if defined(LEV6_DEFER) || defined(IPL_REMAP_1) || defined(IPL_REMAP_2) -#define splclock() spl4() -#else -#define splclock() spl6() -#endif -#define splstatclock() splclock() - -/* - * Software interrupt masks - * - * NOTE: splsoftclock() is used by hardclock() to lower the priority from - * clock to softclock before it calls softclock(). - */ -#define splsoftclock() splx(PSL_S|PSL_IPL1) -#define splsoftnet() spl1() -#define splsofttty() spl1() - -/* - * Miscellaneous - */ -#if defined(LEV6_DEFER) || defined(IPL_REMAP_1) || defined(IPL_REMAP_2) -#define splhigh() spl4() -#else -#define splhigh() spl7() -#endif -#define spl0() splx(PSL_S|PSL_IPL0) - -void delay __P((unsigned)); -void DELAY __P((unsigned)); #endif #endif /* !_MACHINE_PARAM_H_ */ |