From: kettenis Date: Sat, 14 May 2022 15:25:57 +0000 (+0000) Subject: uvm_km_valloc(9), uvm_km_valloc_try(9), uvm_km_valloc_wait(9) and X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=72a0854b669a0194895eeac5ffcdf5fc27bf2a30;p=openbsd uvm_km_valloc(9), uvm_km_valloc_try(9), uvm_km_valloc_wait(9) and uvm_km_valloc_align(9) are no longer used. Remove these functions. ok mpi@ --- diff --git a/sys/uvm/uvm_extern.h b/sys/uvm/uvm_extern.h index f64e4598598..ba95d31ad7c 100644 --- a/sys/uvm/uvm_extern.h +++ b/sys/uvm/uvm_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_extern.h,v 1.160 2022/03/12 08:11:07 mpi Exp $ */ +/* $OpenBSD: uvm_extern.h,v 1.161 2022/05/14 15:25:57 kettenis Exp $ */ /* $NetBSD: uvm_extern.h,v 1.57 2001/03/09 01:02:12 chs Exp $ */ /* @@ -300,11 +300,6 @@ vaddr_t uvm_km_kmemalloc_pla(struct vm_map *, paddr_t, paddr_t, paddr_t, paddr_t, int); #define uvm_km_kmemalloc(map, obj, sz, flags) \ uvm_km_kmemalloc_pla(map, obj, sz, 0, flags, 0, (paddr_t)-1, 0, 0, 0) -vaddr_t uvm_km_valloc(vm_map_t, vsize_t); -vaddr_t uvm_km_valloc_try(vm_map_t, vsize_t); -vaddr_t uvm_km_valloc_wait(vm_map_t, vsize_t); -vaddr_t uvm_km_valloc_align(struct vm_map *, vsize_t, - vsize_t, int); vaddr_t uvm_km_valloc_prefer_wait(vm_map_t, vsize_t, voff_t); struct vm_map *uvm_km_suballoc(vm_map_t, vaddr_t *, vaddr_t *, vsize_t, int, boolean_t, vm_map_t); diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c index e62eed9729d..eeb865fc011 100644 --- a/sys/uvm/uvm_km.c +++ b/sys/uvm/uvm_km.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_km.c,v 1.148 2022/02/03 17:06:09 kn Exp $ */ +/* $OpenBSD: uvm_km.c,v 1.149 2022/05/14 15:25:57 kettenis Exp $ */ /* $NetBSD: uvm_km.c,v 1.42 2001/01/14 02:10:01 thorpej Exp $ */ /* @@ -529,47 +529,6 @@ uvm_km_alloc1(struct vm_map *map, vsize_t size, vsize_t align, boolean_t zeroit) return kva; } -/* - * uvm_km_valloc: allocate zero-fill memory in the kernel's address space - * - * => memory is not allocated until fault time - */ - -vaddr_t -uvm_km_valloc(struct vm_map *map, vsize_t size) -{ - return uvm_km_valloc_align(map, size, 0, 0); -} - -vaddr_t -uvm_km_valloc_try(struct vm_map *map, vsize_t size) -{ - return uvm_km_valloc_align(map, size, 0, UVM_KMF_TRYLOCK); -} - -vaddr_t -uvm_km_valloc_align(struct vm_map *map, vsize_t size, vsize_t align, int flags) -{ - vaddr_t kva; - - KASSERT(vm_map_pmap(map) == pmap_kernel()); - - size = round_page(size); - kva = vm_map_min(map); /* hint */ - - /* - * allocate some virtual space. will be demand filled by kernel_object. - */ - if (__predict_false(uvm_map(map, &kva, size, uvm.kernel_object, - UVM_UNKNOWN_OFFSET, align, - UVM_MAPFLAG(PROT_READ | PROT_WRITE, PROT_READ | PROT_WRITE, - MAP_INHERIT_NONE, MADV_RANDOM, flags)) != 0)) { - return 0; - } - - return kva; -} - /* * uvm_km_valloc_wait: allocate zero-fill memory in the kernel's address space * @@ -608,12 +567,6 @@ uvm_km_valloc_prefer_wait(struct vm_map *map, vsize_t size, voff_t prefer) /*NOTREACHED*/ } -vaddr_t -uvm_km_valloc_wait(struct vm_map *map, vsize_t size) -{ - return uvm_km_valloc_prefer_wait(map, size, UVM_UNKNOWN_OFFSET); -} - #if defined(__HAVE_PMAP_DIRECT) /* * uvm_km_page allocator, __HAVE_PMAP_DIRECT arch