summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mvme88k/include/param.h38
1 files changed, 15 insertions, 23 deletions
diff --git a/sys/arch/mvme88k/include/param.h b/sys/arch/mvme88k/include/param.h
index c100bfcecdc..dd119860b2b 100644
--- a/sys/arch/mvme88k/include/param.h
+++ b/sys/arch/mvme88k/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.20 2001/08/23 08:47:32 miod Exp $ */
+/* $OpenBSD: param.h,v 1.21 2001/09/28 20:46:09 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* Copyright (c) 1988 University of Utah.
@@ -40,7 +40,7 @@
* from: Utah $Hdr: machparam.h 1.11 89/08/14$
*
* @(#)param.h 7.8 (Berkeley) 6/28/91
- * $Id: param.h,v 1.20 2001/08/23 08:47:32 miod Exp $
+ * $Id: param.h,v 1.21 2001/09/28 20:46:09 miod Exp $
*/
#ifndef _MACHINE_PARAM_H_
#define _MACHINE_PARAM_H_
@@ -48,7 +48,6 @@
#ifdef _KERNEL
#ifndef _LOCORE
#include <machine/cpu.h>
-#include <machine/psl.h>
#endif /* _LOCORE */
#endif
@@ -80,11 +79,11 @@
#define PAGE_SIZE (1 << PAGE_SHIFT)
#define PAGE_MASK (PAGE_SIZE - 1)
-#define NPTEPG (NBPG/(sizeof(u_int)))
+#define NPTEPG (PAGE_SIZE / (sizeof(u_int)))
-#define NBSEG (1<<22) /* bytes/segment */
-#define SEGOFSET (NBSEG-1) /* byte offset into segment */
-#define SEGSHIFT 22 /* LOG2(NBSEG) */
+#define SEGSHIFT 22 /* LOG2(NBSEG) */
+#define NBSEG (1 << SEGSHIFT) /* bytes/segment */
+#define SEGOFSET (NBSEG - 1) /* byte offset into segment */
/*
* 187 Bug uses the bottom 64k. We allocate ptes to map this into the
@@ -142,18 +141,18 @@
#define NKMEMCLUSTERS (4096*1024/PAGE_SIZE)
#endif
-#define MSGBUFSIZE 4096
+#define MSGBUFSIZE PAGE_SIZE
/* pages ("clicks") to disk blocks */
-#define ctod(x) ((x)<<(PGSHIFT-DEV_BSHIFT))
-#define dtoc(x) ((x)>>(PGSHIFT-DEV_BSHIFT))
-#define dtob(x) ((x)<<DEV_BSHIFT)
+#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
+#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
+#define dtob(x) ((x) << DEV_BSHIFT)
/* pages to bytes */
-#define ctob(x) ((x)<<PGSHIFT)
+#define ctob(x) ((x) << PGSHIFT)
/* bytes to pages */
-#define btoc(x) (((unsigned)(x)+(NBPG-1))>>PGSHIFT)
+#define btoc(x) (((unsigned)(x) + PAGE_MASK) >> PGSHIFT)
#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
((unsigned)(bytes) >> DEV_BSHIFT)
@@ -169,27 +168,19 @@
#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE))
/*
- * Mach derived conversion macros
- */
-#define mvme88k_btop(x) ((unsigned)(x) >> PGSHIFT)
-#define mvme88k_ptob(x) ((unsigned)(x) << PGSHIFT)
-
-#include <machine/psl.h>
-
-/*
* Get interrupt glue.
*/
+#include <machine/psl.h>
#include <machine/intr.h>
#ifdef _KERNEL
extern int delay __P((int));
#define DELAY(x) delay(x)
-#endif
-#ifdef _KERNEL
extern int cputyp;
extern int cpumod;
#endif
+
/*
* Values for the cputyp variable.
*/
@@ -197,6 +188,7 @@ extern int cpumod;
#define CPU_188 0x188
#define CPU_197 0x197
#define CPU_8120 0x8120
+
#endif /* !_MACHINE_PARAM_H_ */