summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc/sparc/pmap.c5
-rw-r--r--sys/arch/sparc64/sparc64/pmap.c5
-rw-r--r--sys/arch/vax/vax/pmap.c5
-rw-r--r--sys/uvm/uvm_map.c10
4 files changed, 18 insertions, 7 deletions
diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c
index 1a8c2680a3b..9fd3efc3013 100644
--- a/sys/arch/sparc/sparc/pmap.c
+++ b/sys/arch/sparc/sparc/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.158 2010/12/06 20:57:18 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.159 2011/04/26 23:50:21 ariane Exp $ */
/* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */
/*
@@ -6275,7 +6275,8 @@ pmap_remove_holes(struct vm_map *map)
(void)uvm_map(map, &shole, ehole - shole, NULL,
UVM_UNKNOWN_OFFSET, 0,
UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,
- UVM_ADV_RANDOM, UVM_FLAG_NOMERGE | UVM_FLAG_HOLE));
+ UVM_ADV_RANDOM,
+ UVM_FLAG_NOMERGE | UVM_FLAG_HOLE | UVM_FLAG_FIXED));
}
#endif
}
diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c
index 35099d8bcfe..5482dc964c9 100644
--- a/sys/arch/sparc64/sparc64/pmap.c
+++ b/sys/arch/sparc64/sparc64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.72 2011/04/07 15:30:16 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.73 2011/04/26 23:50:21 ariane Exp $ */
/* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */
#undef NO_VCACHE /* Don't forget the locked TLB in dostart */
/*
@@ -3614,7 +3614,8 @@ pmap_remove_holes(struct vm_map *map)
(void)uvm_map(map, &shole, ehole - shole, NULL, UVM_UNKNOWN_OFFSET, 0,
UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,
- UVM_ADV_RANDOM, UVM_FLAG_NOMERGE | UVM_FLAG_HOLE));
+ UVM_ADV_RANDOM,
+ UVM_FLAG_NOMERGE | UVM_FLAG_HOLE | UVM_FLAG_FIXED));
}
#ifdef DDB
diff --git a/sys/arch/vax/vax/pmap.c b/sys/arch/vax/vax/pmap.c
index 6fa7e4f97bc..5a06fbcd7f4 100644
--- a/sys/arch/vax/vax/pmap.c
+++ b/sys/arch/vax/vax/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.50 2008/09/30 20:00:29 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.51 2011/04/26 23:50:21 ariane Exp $ */
/* $NetBSD: pmap.c,v 1.74 1999/11/13 21:32:25 matt Exp $ */
/*
* Copyright (c) 1994, 1998, 1999 Ludd, University of Lule}, Sweden.
@@ -426,7 +426,8 @@ pmap_remove_holes(struct vm_map *map)
(void)uvm_map(map, &shole, ehole - shole, NULL, UVM_UNKNOWN_OFFSET, 0,
UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,
- UVM_ADV_RANDOM, UVM_FLAG_NOMERGE | UVM_FLAG_HOLE));
+ UVM_ADV_RANDOM,
+ UVM_FLAG_NOMERGE | UVM_FLAG_HOLE | UVM_FLAG_FIXED));
}
void
diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c
index 9440e1563ed..07bc61fb37e 100644
--- a/sys/uvm/uvm_map.c
+++ b/sys/uvm/uvm_map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_map.c,v 1.134 2011/04/18 19:23:46 art Exp $ */
+/* $OpenBSD: uvm_map.c,v 1.135 2011/04/26 23:50:21 ariane Exp $ */
/* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */
/*
@@ -744,6 +744,14 @@ uvm_map_p(struct vm_map *map, vaddr_t *startp, vsize_t size,
map, *startp, size, flags);
UVMHIST_LOG(maphist, " uobj/offset %p/%ld", uobj, (u_long)uoffset,0,0);
+ /*
+ * Holes are incompatible with other types of mappings.
+ */
+ if (flags & UVM_FLAG_HOLE) {
+ KASSERT(uobj == NULL && (flags & UVM_FLAG_FIXED) != 0 &&
+ (flags & (UVM_FLAG_OVERLAY | UVM_FLAG_COPYONW)) == 0);
+ }
+
#ifdef KVA_GUARDPAGES
if (map == kernel_map && !(flags & UVM_FLAG_FIXED)) {
/*