From 67e981396d70d32ae0d9d2c6631d4bca92c17d49 Mon Sep 17 00:00:00 2001 From: miod Date: Wed, 3 Apr 2024 18:43:32 +0000 Subject: [PATCH] pmap_virtual_space() and pmap_steal_memory() are mutually exclusive, so make sure only one of them is prototyped and only one of them is implemented. ok mpi@ kettenis@ --- sys/arch/amd64/amd64/pmap.c | 9 +-------- sys/arch/i386/i386/pmap.c | 4 ++-- sys/uvm/uvm_pmap.h | 5 +++-- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/sys/arch/amd64/amd64/pmap.c b/sys/arch/amd64/amd64/pmap.c index 1886ef87322..4d86cb3f20d 100644 --- a/sys/arch/amd64/amd64/pmap.c +++ b/sys/arch/amd64/amd64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.165 2023/12/29 13:23:27 jca Exp $ */ +/* $OpenBSD: pmap.c,v 1.166 2024/04/03 18:43:32 miod Exp $ */ /* $NetBSD: pmap.c,v 1.3 2003/05/08 18:13:13 thorpej Exp $ */ /* @@ -3105,13 +3105,6 @@ pmap_steal_memory(vsize_t size, vaddr_t *start, vaddr_t *end) return (va); } -void -pmap_virtual_space(vaddr_t *vstartp, vaddr_t *vendp) -{ - *vstartp = virtual_avail; - *vendp = VM_MAX_KERNEL_ADDRESS; -} - /* * pmap_convert * diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c index 8c66ae97579..dc7f8a152d4 100644 --- a/sys/arch/i386/i386/pmap.c +++ b/sys/arch/i386/i386/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.222 2023/04/13 15:23:22 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.223 2024/04/03 18:43:32 miod Exp $ */ /* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */ /* @@ -1555,7 +1555,7 @@ pmap_extract_86(struct pmap *pmap, vaddr_t va, paddr_t *pap) } /* - * pmap_virtual_space: used during bootup [pmap_steal_memory] to + * pmap_virtual_space: used during bootup [uvm_pageboot_alloc] to * determine the bounds of the kernel virtual address space. */ diff --git a/sys/uvm/uvm_pmap.h b/sys/uvm/uvm_pmap.h index c5507ca17a3..e03f051234a 100644 --- a/sys/uvm/uvm_pmap.h +++ b/sys/uvm/uvm_pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pmap.h,v 1.33 2023/04/13 15:23:23 miod Exp $ */ +/* $OpenBSD: uvm_pmap.h,v 1.34 2024/04/03 18:43:32 miod Exp $ */ /* $NetBSD: uvm_pmap.h,v 1.1 2000/06/27 09:00:14 mrg Exp $ */ /* @@ -173,9 +173,10 @@ void pmap_update(pmap_t); void pmap_zero_page(struct vm_page *); #endif -void pmap_virtual_space(vaddr_t *, vaddr_t *); #if defined(PMAP_STEAL_MEMORY) vaddr_t pmap_steal_memory(vsize_t, vaddr_t *, vaddr_t *); +#else +void pmap_virtual_space(vaddr_t *, vaddr_t *); #endif /* nested pmaps are used in i386/amd64 vmm */ -- 2.20.1