summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-03-06 22:05:32 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-03-06 22:05:32 +0000
commit549c5967bd690e98d67c1972d07cb17605451fe9 (patch)
treea631075a5d3993f0387ed2359239d13c1b11f2d8
parentd8961f34b035f63cf87fa838521bd854dad23f5b (diff)
Some architectures don't allocate any memory out of the kernel_map space
before uvm_km_init (alpha). Don't uvm_map 0 space, it gives very strange breakage on alpha.
-rw-r--r--sys/uvm/uvm_km.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c
index 652ddafcc77..8f6a730ab5a 100644
--- a/sys/uvm/uvm_km.c
+++ b/sys/uvm/uvm_km.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_km.c,v 1.27 2001/12/19 08:58:07 art Exp $ */
+/* $OpenBSD: uvm_km.c,v 1.28 2002/03/06 22:05:31 art Exp $ */
/* $NetBSD: uvm_km.c,v 1.42 2001/01/14 02:10:01 thorpej Exp $ */
/*
@@ -234,8 +234,8 @@ uvm_km_init(start, end)
uvm_map_setup(&kernel_map_store, base, end, VM_MAP_PAGEABLE);
kernel_map_store.pmap = pmap_kernel();
- if (uvm_map(&kernel_map_store, &base, start - base, NULL,
- UVM_UNKNOWN_OFFSET, 0, UVM_MAPFLAG(UVM_PROT_ALL, UVM_PROT_ALL,
+ if (base != start && uvm_map(&kernel_map_store, &base, start - base,
+ NULL, UVM_UNKNOWN_OFFSET, 0, UVM_MAPFLAG(UVM_PROT_ALL, UVM_PROT_ALL,
UVM_INH_NONE, UVM_ADV_RANDOM,UVM_FLAG_FIXED)) != KERN_SUCCESS)
panic("uvm_km_init: could not reserve space for kernel");