summaryrefslogtreecommitdiff
path: root/sys/arch/mips64/include
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-04-27 18:14:14 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-04-27 18:14:14 +0000
commite71e5b9906e8bcad4ba22106a7629600d154ba59 (patch)
treec1d5f704c28a6041eac0906662795b26998152b8 /sys/arch/mips64/include
parent3a581d5e76c368bf4de0ee9c6188aa3f951dd1ef (diff)
More pmap changes from the potpourri pool:
- use wm_page pg_flags pmap-reserved flags to store attributes, instead of defining a vm_page_md field. - use atomic operations to touch the above mentioned flags. - never create ptes with PG_RO and PG_M set (this was harmless anyway). - in pmap_clear_modify(), do not flush cache if the page was mapped uncached. Tested on r5k, rm5200, r10k and r12k.
Diffstat (limited to 'sys/arch/mips64/include')
-rw-r--r--sys/arch/mips64/include/pmap.h10
-rw-r--r--sys/arch/mips64/include/pte.h3
-rw-r--r--sys/arch/mips64/include/vmparam.h12
3 files changed, 11 insertions, 14 deletions
diff --git a/sys/arch/mips64/include/pmap.h b/sys/arch/mips64/include/pmap.h
index 1d133c58b85..88a2a5ec9bb 100644
--- a/sys/arch/mips64/include/pmap.h
+++ b/sys/arch/mips64/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.11 2007/04/14 14:52:37 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.12 2007/04/27 18:14:11 miod Exp $ */
/*
* Copyright (c) 1987 Carnegie-Mellon University
@@ -88,10 +88,10 @@ typedef struct pmap {
/* flags for pv_entry */
-#define PV_UNCACHED 0x0001 /* Page is mapped unchached */
-#define PV_CACHED 0x0002 /* Page has been cached */
-#define PV_ATTR_MOD 0x0004
-#define PV_ATTR_REF 0x0008
+#define PV_UNCACHED PG_PMAP0 /* Page is mapped unchached */
+#define PV_CACHED PG_PMAP1 /* Page has been cached */
+#define PV_ATTR_MOD PG_PMAP2
+#define PV_ATTR_REF PG_PMAP3
#define PV_PRESERVE (PV_ATTR_MOD | PV_ATTR_REF)
extern struct pmap kernel_pmap_store;
diff --git a/sys/arch/mips64/include/pte.h b/sys/arch/mips64/include/pte.h
index 8d1a5aeaa9b..18df5afd99f 100644
--- a/sys/arch/mips64/include/pte.h
+++ b/sys/arch/mips64/include/pte.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pte.h,v 1.3 2005/08/07 07:29:44 miod Exp $ */
+/* $OpenBSD: pte.h,v 1.4 2007/04/27 18:14:11 miod Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -89,7 +89,6 @@ typedef union pt_entry {
#define PG_IOPAGE (PG_G | PG_V | PG_M | PG_UNCACHED)
#define PG_FRAME 0x3fffffc0
#define PG_SHIFT 6
-#define pfn_is_ext(x) ((x) & 0x3c000000)
#define vad_to_pfn(x) (((unsigned)(x) >> PG_SHIFT) & PG_FRAME)
#define vad_to_pfn64(x) (((quad_t)(x) >> PG_SHIFT) & PG_FRAME)
#define vad_to_vpn(x) ((int)((unsigned)(x) & PG_SVPN))
diff --git a/sys/arch/mips64/include/vmparam.h b/sys/arch/mips64/include/vmparam.h
index 274951eec2d..767a8712cf5 100644
--- a/sys/arch/mips64/include/vmparam.h
+++ b/sys/arch/mips64/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmparam.h,v 1.11 2007/04/14 14:54:28 miod Exp $ */
+/* $OpenBSD: vmparam.h,v 1.12 2007/04/27 18:14:11 miod Exp $ */
/* $NetBSD: vmparam.h,v 1.5 1994/10/26 21:10:10 cgd Exp $ */
/*
@@ -123,20 +123,18 @@ typedef 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; /* Some flags for the mapping */
} *pv_entry_t;
#define __HAVE_VM_PAGE_MD
struct vm_page_md {
- struct pv_entry pvent; /* pv list of this seg */
+ struct pv_entry pv_ent; /* pv list of this seg */
};
#define VM_MDPAGE_INIT(pg) \
do { \
- (pg)->mdpage.pvent.pv_next = NULL; \
- (pg)->mdpage.pvent.pv_pmap = NULL; \
- (pg)->mdpage.pvent.pv_va = 0; \
- (pg)->mdpage.pvent.pv_flags = 0; \
+ (pg)->mdpage.pv_ent.pv_next = NULL; \
+ (pg)->mdpage.pv_ent.pv_pmap = NULL; \
+ (pg)->mdpage.pv_ent.pv_va = 0; \
} while (0)
#endif /* _KERNEL && !_LOCORE */