Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Add uvm_km_valloc_prefer_wait(). Used to valloc wit...
details: https://anonhg.NetBSD.org/src/rev/5764e67950d5
branches: trunk
changeset: 495247:5764e67950d5
user: jeffs <jeffs%NetBSD.org@localhost>
date: Mon Jul 24 20:10:51 2000 +0000
description:
Add uvm_km_valloc_prefer_wait(). Used to valloc with the passed in
voff_t being passed to PMAP_PREFER(), which results in the propper
virtual alignment of the allocated space.
diffstat:
sys/uvm/uvm_extern.h | 4 +++-
sys/uvm/uvm_km.c | 17 +++++++++++++----
2 files changed, 16 insertions(+), 5 deletions(-)
diffs (67 lines):
diff -r b4cc83bbe000 -r 5764e67950d5 sys/uvm/uvm_extern.h
--- a/sys/uvm/uvm_extern.h Mon Jul 24 20:09:15 2000 +0000
+++ b/sys/uvm/uvm_extern.h Mon Jul 24 20:10:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_extern.h,v 1.45 2000/06/27 16:16:43 mrg Exp $ */
+/* $NetBSD: uvm_extern.h,v 1.46 2000/07/24 20:10:51 jeffs Exp $ */
/*
*
@@ -453,6 +453,8 @@
boolean_t, vm_map_t));
vaddr_t uvm_km_valloc __P((vm_map_t, vsize_t));
vaddr_t uvm_km_valloc_wait __P((vm_map_t, vsize_t));
+vaddr_t uvm_km_valloc_prefer_wait __P((vm_map_t, vsize_t,
+ voff_t));
vaddr_t uvm_km_alloc_poolpage1 __P((vm_map_t,
struct uvm_object *, boolean_t));
void uvm_km_free_poolpage1 __P((vm_map_t, vaddr_t));
diff -r b4cc83bbe000 -r 5764e67950d5 sys/uvm/uvm_km.c
--- a/sys/uvm/uvm_km.c Mon Jul 24 20:09:15 2000 +0000
+++ b/sys/uvm/uvm_km.c Mon Jul 24 20:10:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_km.c,v 1.37 2000/06/27 17:29:24 mrg Exp $ */
+/* $NetBSD: uvm_km.c,v 1.38 2000/07/24 20:10:53 jeffs Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -806,12 +806,13 @@
*/
vaddr_t
-uvm_km_valloc_wait(map, size)
+uvm_km_valloc_prefer_wait(map, size, prefer)
vm_map_t map;
vsize_t size;
+ voff_t prefer;
{
vaddr_t kva;
- UVMHIST_FUNC("uvm_km_valloc_wait"); UVMHIST_CALLED(maphist);
+ UVMHIST_FUNC("uvm_km_valloc_prefer_wait"); UVMHIST_CALLED(maphist);
UVMHIST_LOG(maphist, "(map=0x%x, size=0x%x)", map, size, 0,0);
@@ -833,7 +834,7 @@
*/
if (__predict_true(uvm_map(map, &kva, size, uvm.kernel_object,
- UVM_UNKNOWN_OFFSET, UVM_MAPFLAG(UVM_PROT_ALL,
+ prefer, UVM_MAPFLAG(UVM_PROT_ALL,
UVM_PROT_ALL, UVM_INH_NONE, UVM_ADV_RANDOM, 0))
== KERN_SUCCESS)) {
UVMHIST_LOG(maphist,"<- done (kva=0x%x)", kva,0,0,0);
@@ -850,6 +851,14 @@
/*NOTREACHED*/
}
+vaddr_t
+uvm_km_valloc_wait(map, size)
+ vm_map_t map;
+ vsize_t size;
+{
+ return uvm_km_valloc_prefer_wait(map, size, UVM_UNKNOWN_OFFSET);
+}
+
/* Sanity; must specify both or none. */
#if (defined(PMAP_MAP_POOLPAGE) || defined(PMAP_UNMAP_POOLPAGE)) && \
(!defined(PMAP_MAP_POOLPAGE) || !defined(PMAP_UNMAP_POOLPAGE))
Home |
Main Index |
Thread Index |
Old Index