summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k/include/vmparam.h
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-01-24 09:57:45 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-01-24 09:57:45 +0000
commit1885dbbd49414bf51885eb9eec436e66bb1171e6 (patch)
tree9fd195e4be0aefac1f11be44ef0103ba2c844c33 /sys/arch/mvme88k/include/vmparam.h
parentfae7f597349d2dadcde2c1f26438ae8e98751a2b (diff)
Convert m88k pmap from physseg to VM_PAGE_MD.
This allows us to remove some ambiguities on how some functions are called, remove some diagnostic checks for conditions that can never happen and remove the ugly hack with "pmap_initialized". Then, rework internal function interfaces and some logic so as to stop fetching vm_page from a pa and the reverse every now and then - this makes some pmap operations run much faster. While there, various KNF and whitespace fixes, and rename some structure fields to be closer to the m68k pmap. per art@'s idea.
Diffstat (limited to 'sys/arch/mvme88k/include/vmparam.h')
-rw-r--r--sys/arch/mvme88k/include/vmparam.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/sys/arch/mvme88k/include/vmparam.h b/sys/arch/mvme88k/include/vmparam.h
index 99dbe816ac9..c1565f01437 100644
--- a/sys/arch/mvme88k/include/vmparam.h
+++ b/sys/arch/mvme88k/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmparam.h,v 1.20 2002/02/17 22:59:53 maja Exp $ */
+/* $OpenBSD: vmparam.h,v 1.21 2003/01/24 09:57:41 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1992 Carnegie Mellon University
@@ -107,11 +107,27 @@
/*
* pmap-specific data stored in the vm_physmem[] array.
*/
-#define __HAVE_PMAP_PHYSSEG
-struct pmap_physseg {
- struct pv_entry *pvent; /* pv table for this seg */
- char *attrs; /* page modify list for this seg */
+
+/* XXX - belongs in pmap.h, but put here because of ordering issues */
+struct pv_entry {
+ struct pv_entry *pv_next; /* next pv_entry */
+ struct pmap *pv_pmap; /* pmap where mapping lies */
+ vaddr_t pv_va; /* virtual address for mapping */
+ int pv_flags;
+};
+
+#define __HAVE_VM_PAGE_MD
+struct vm_page_md {
+ struct pv_entry pvent;
};
+
+#define VM_MDPAGE_INIT(pg) do { \
+ (pg)->mdpage.pvent.pv_next = NULL; \
+ (pg)->mdpage.pvent.pv_pmap = PMAP_NULL; \
+ (pg)->mdpage.pvent.pv_va = 0; \
+ (pg)->mdpage.pvent.pv_flags = 0; \
+} while (0)
+
#endif /* _LOCORE */
#endif /* _MACHINE_VM_PARAM_ */