summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2021-04-21 10:02:06 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2021-04-21 10:02:06 +0000
commit5653c4a47767c88141a50d4c3b13b3be815db71f (patch)
tree017ab5b1dbcaf2c6ab531ac780bdb332d0b56271 /sys
parent999ad48794cf160aeb5bdab915e068996d39e83b (diff)
Convert remaining uvm_km_zalloc(9) to km_alloc(9).
Tested by bluhm@, jj@, kettenis@ and Scott Bennett. ok kettenis@
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_malloc.c6
-rw-r--r--sys/uvm/uvm_page.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index 2c768625607..f487cab77db 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_malloc.c,v 1.144 2021/02/23 13:50:16 jsg Exp $ */
+/* $OpenBSD: kern_malloc.c,v 1.145 2021/04/21 10:02:05 mpi Exp $ */
/* $NetBSD: kern_malloc.c,v 1.15.4.2 1996/06/13 17:10:56 cgd Exp $ */
/*
@@ -580,8 +580,8 @@ kmeminit(void)
FALSE, &kmem_map_store);
kmembase = (char *)base;
kmemlimit = (char *)limit;
- kmemusage = (struct kmemusage *) uvm_km_zalloc(kernel_map,
- (vsize_t)(nkmempages * sizeof(struct kmemusage)));
+ kmemusage = km_alloc(round_page(nkmempages * sizeof(struct kmemusage)),
+ &kv_any, &kp_zero, &kd_waitok);
for (indx = 0; indx < MINBUCKET + 16; indx++) {
XSIMPLEQ_INIT(&bucket[indx].kb_freelist);
}
diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c
index 4a9563c570f..8307b76113e 100644
--- a/sys/uvm/uvm_page.c
+++ b/sys/uvm/uvm_page.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_page.c,v 1.156 2021/03/26 13:40:05 mpi Exp $ */
+/* $OpenBSD: uvm_page.c,v 1.157 2021/04/21 10:02:05 mpi Exp $ */
/* $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $ */
/*
@@ -542,8 +542,8 @@ uvm_page_physload(paddr_t start, paddr_t end, paddr_t avail_start,
npages = end - start; /* # of pages */
- pgs = (struct vm_page *)uvm_km_zalloc(kernel_map,
- npages * sizeof(*pgs));
+ pgs = km_alloc(npages * sizeof(*pgs), &kv_any, &kp_zero,
+ &kd_waitok);
if (pgs == NULL) {
printf("uvm_page_physload: can not malloc vm_page "
"structs for segment\n");