-/* $OpenBSD: uvm_addr.c,v 1.35 2024/06/07 06:04:43 jsg Exp $ */
+/* $OpenBSD: uvm_addr.c,v 1.36 2024/07/04 04:52:10 jsg Exp $ */
/*
* Copyright (c) 2011 Ariane van der Steldt <ariane@stack.nl>
(*uaddr->uaddr_functions->uaddr_destroy)(uaddr);
}
-/*
- * Move address forward to satisfy align, offset.
- */
-vaddr_t
-uvm_addr_align(vaddr_t addr, vaddr_t align, vaddr_t offset)
-{
- vaddr_t result = (addr & ~(align - 1)) + offset;
- if (result < addr)
- result += align;
- return result;
-}
-
-/*
- * Move address backwards to satisfy align, offset.
- */
-vaddr_t
-uvm_addr_align_back(vaddr_t addr, vaddr_t align, vaddr_t offset)
-{
- vaddr_t result = (addr & ~(align - 1)) + offset;
- if (result > addr)
- result -= align;
- return result;
-}
-
/*
* Directional first fit.
*
-/* $OpenBSD: uvm_addr.h,v 1.7 2017/01/17 17:19:21 stefan Exp $ */
+/* $OpenBSD: uvm_addr.h,v 1.8 2024/07/04 04:52:10 jsg Exp $ */
/*
* Copyright (c) 2011 Ariane van der Steldt <ariane@stack.nl>
void uvm_addr_init(void);
void uvm_addr_destroy(struct uvm_addr_state *);
-vaddr_t uvm_addr_align(vaddr_t, vaddr_t, vaddr_t);
-vaddr_t uvm_addr_align_back(vaddr_t, vaddr_t, vaddr_t);
int uvm_addr_linsearch(struct vm_map *,
struct uvm_addr_state *, struct vm_map_entry **,
vaddr_t *addr_out, vaddr_t, vsize_t,