diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2024-08-24 10:46:44 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2024-08-24 10:46:44 +0000 |
commit | 3c5a7e2c3322259644f48917f13533eacc313c64 (patch) | |
tree | 2cea3e412b9863e6ffb467b7bba69dbd25218fe6 /sys | |
parent | 7e826855d7a6c72fd9eedf05161f618c4e77007f (diff) |
Place uvm_km_zalloc(9) under #ifdef __i386__.
This allocator is only used by a single pmap which will be hopefully
converted.
Suggested by guenther@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/uvm/uvm_extern.h | 6 | ||||
-rw-r--r-- | sys/uvm/uvm_km.c | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/sys/uvm/uvm_extern.h b/sys/uvm/uvm_extern.h index 973c4ab1b52..3bbd15047cb 100644 --- a/sys/uvm/uvm_extern.h +++ b/sys/uvm/uvm_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_extern.h,v 1.176 2024/08/24 10:38:44 mpi Exp $ */ +/* $OpenBSD: uvm_extern.h,v 1.177 2024/08/24 10:46:43 mpi Exp $ */ /* $NetBSD: uvm_extern.h,v 1.57 2001/03/09 01:02:12 chs Exp $ */ /* @@ -287,7 +287,9 @@ int uvm_io(vm_map_t, struct uio *, int); #define UVM_IO_FIXPROT 0x01 -vaddr_t uvm_km_zalloc(vm_map_t, vsize_t, vsize_t); +#ifdef __i386__ +vaddr_t uvm_km_zalloc(vm_map_t, vsize_t); +#endif void uvm_km_free(vm_map_t, vaddr_t, vsize_t); vaddr_t uvm_km_kmemalloc_pla(struct vm_map *, struct uvm_object *, vsize_t, vsize_t, int, diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c index 9d3af6cf962..b2c4ba882e9 100644 --- a/sys/uvm/uvm_km.c +++ b/sys/uvm/uvm_km.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_km.c,v 1.153 2024/08/24 10:38:44 mpi Exp $ */ +/* $OpenBSD: uvm_km.c,v 1.154 2024/08/24 10:46:43 mpi Exp $ */ /* $NetBSD: uvm_km.c,v 1.42 2001/01/14 02:10:01 thorpej Exp $ */ /* @@ -433,13 +433,14 @@ uvm_km_free(struct vm_map *map, vaddr_t addr, vsize_t size) uvm_unmap(map, trunc_page(addr), round_page(addr+size)); } +#ifdef __i386__ /* * uvm_km_zalloc: allocate wired down memory in the kernel map. * * => we can sleep if needed */ vaddr_t -uvm_km_zalloc(struct vm_map *map, vsize_t size, vsize_t align) +uvm_km_zalloc(struct vm_map *map, vsize_t size) { vaddr_t kva, loopva; voff_t offset; @@ -452,7 +453,7 @@ uvm_km_zalloc(struct vm_map *map, vsize_t size, vsize_t align) /* allocate some virtual space */ if (__predict_false(uvm_map(map, &kva, size, uvm.kernel_object, - UVM_UNKNOWN_OFFSET, align, + UVM_UNKNOWN_OFFSET, 0, UVM_MAPFLAG(PROT_READ | PROT_WRITE, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_INHERIT_NONE, MADV_RANDOM, 0)) != 0)) { @@ -510,6 +511,7 @@ uvm_km_zalloc(struct vm_map *map, vsize_t size, vsize_t align) return kva; } +#endif #if defined(__HAVE_PMAP_DIRECT) /* |