summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-03-25 18:17:23 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-03-25 18:17:23 +0000
commitfce290c52f7d1291f7d5758a9ab4ad8d724b21ff (patch)
tree2349323c174de70bc2b9a4ad4a75bf7cf31a664c /sys
parent6612be82ed231946ef124c31fa1d5082c2eadbfb (diff)
Move SEGSHIFT-related definitions and macros to <m68k/pte_motorola.h>, as they
only matter to pmap-related code. Fixes libkvm build on m68k.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/m68k/include/param.h25
-rw-r--r--sys/arch/m68k/include/pte_motorola.h21
2 files changed, 21 insertions, 25 deletions
diff --git a/sys/arch/m68k/include/param.h b/sys/arch/m68k/include/param.h
index 778ecf0281a..9e060080f2d 100644
--- a/sys/arch/m68k/include/param.h
+++ b/sys/arch/m68k/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.29 2013/03/25 17:46:24 deraadt Exp $ */
+/* $OpenBSD: param.h,v 1.30 2013/03/25 18:17:22 miod Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -54,22 +54,6 @@
#define NBPG PAGE_SIZE
-#define SEGSHIFT020 (34 - PAGE_SHIFT)
-#define SEGSHIFT040 (18)
-#ifndef SEGSHIFT
-#if defined(M68040) || defined(M68060)
-#if defined(M68020) || defined(M68030)
-#define SEGSHIFT ((mmutype <= MMU_68040) ? SEGSHIFT040 : SEGSHIFT020)
-#else
-#define SEGSHIFT SEGSHIFT040
-#endif
-#else
-#define SEGSHIFT SEGSHIFT020
-#endif
-#define NBSEG (1 << SEGSHIFT)
-#define SEGOFSET (NBSEG - 1)
-#endif
-
#define UPAGES 2 /* pages of u-area */
#define USPACE (UPAGES * PAGE_SIZE) /* total size of u-area */
#define USPACE_ALIGN 0 /* u-area alignment 0-none */
@@ -82,13 +66,6 @@
*/
#define NKMEMPAGES_MAX_DEFAULT ((64 * 1024 * 1024) >> PAGE_SHIFT)
-/*
- * Mach derived conversion macros
- */
-#define m68k_round_seg(x) ((((unsigned)(x)) + SEGOFSET) & ~SEGOFSET)
-#define m68k_trunc_seg(x) ((unsigned)(x) & ~SEGOFSET)
-#define m68k_page_offset(x) ((unsigned)(x) & PGOFSET)
-
#include <machine/cpu.h>
#endif /* _KERNEL */
diff --git a/sys/arch/m68k/include/pte_motorola.h b/sys/arch/m68k/include/pte_motorola.h
index 27fe0a1a53d..b2502eaa4eb 100644
--- a/sys/arch/m68k/include/pte_motorola.h
+++ b/sys/arch/m68k/include/pte_motorola.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pte_motorola.h,v 1.6 2011/03/23 16:54:35 pirofti Exp $ */
+/* $OpenBSD: pte_motorola.h,v 1.7 2013/03/25 18:17:22 miod Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -110,4 +110,23 @@ typedef int pt_entry_t; /* Mach page table entry */
#define kvtopte(va) \
(&Sysmap[((unsigned)(va) - VM_MIN_KERNEL_ADDRESS) >> PGSHIFT])
+#define SEGSHIFT020 (34 - PAGE_SHIFT)
+#define SEGSHIFT040 (18)
+#ifndef SEGSHIFT
+#if defined(M68040) || defined(M68060)
+#if defined(M68020) || defined(M68030)
+#define SEGSHIFT ((mmutype <= MMU_68040) ? SEGSHIFT040 : SEGSHIFT020)
+#else
+#define SEGSHIFT SEGSHIFT040
+#endif
+#else
+#define SEGSHIFT SEGSHIFT020
+#endif
+#define NBSEG (1 << SEGSHIFT)
+#define SEGOFSET (NBSEG - 1)
+#endif
+
+#define m68k_round_seg(x) ((((unsigned)(x)) + SEGOFSET) & ~SEGOFSET)
+#define m68k_trunc_seg(x) ((unsigned)(x) & ~SEGOFSET)
+
#endif /* !_M68K_M68K_M68K_PTE_MOTOROLA_H_ */