From d42b6c0a9cee6bd20ac25c584017425f08e2b3ea Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 4 Jul 2024 04:52:10 +0000 Subject: [PATCH] remove uvm_addr_align() and uvm_addr_align_back() not to be confused with uvm_addr_align_forward() and uvm_addr_align_backward() which remain in uvm_addr.c ok mlarkin@ --- sys/uvm/uvm_addr.c | 26 +------------------------- sys/uvm/uvm_addr.h | 4 +--- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/sys/uvm/uvm_addr.c b/sys/uvm/uvm_addr.c index 904218034eb..d022bdf3a3d 100644 --- a/sys/uvm/uvm_addr.c +++ b/sys/uvm/uvm_addr.c @@ -1,4 +1,4 @@ -/* $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 @@ -290,30 +290,6 @@ uvm_addr_destroy(struct uvm_addr_state *uaddr) (*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. * diff --git a/sys/uvm/uvm_addr.h b/sys/uvm/uvm_addr.h index f16126da847..987fcbad9cc 100644 --- a/sys/uvm/uvm_addr.h +++ b/sys/uvm/uvm_addr.h @@ -1,4 +1,4 @@ -/* $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 @@ -75,8 +75,6 @@ struct uvm_addr_functions { 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, -- 2.20.1