diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2023-04-13 15:23:24 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2023-04-13 15:23:24 +0000 |
commit | af3adb43eb6f0959769cc1a4ad5a4b3bc1062440 (patch) | |
tree | 1aadff315af3f281cbf408baad557087ff90afa2 | |
parent | 03c94cbf30ab393b7657fda3fa4ad82799b06c61 (diff) |
pmap_copy() has never, ever, been implemented in any of the platforms OpenBSD
ever ran on, and it's unlikely to ever be implemented, so remove it.
ok jsg@
-rw-r--r-- | share/man/man9/pmap.9 | 30 | ||||
-rw-r--r-- | sys/arch/alpha/alpha/pmap.c | 13 | ||||
-rw-r--r-- | sys/arch/alpha/include/pmap.h | 3 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/pmap.c | 13 | ||||
-rw-r--r-- | sys/arch/amd64/include/pmap.h | 3 | ||||
-rw-r--r-- | sys/arch/arm/include/pmap.h | 3 | ||||
-rw-r--r-- | sys/arch/arm64/arm64/pmap.c | 9 | ||||
-rw-r--r-- | sys/arch/hppa/include/pmap.h | 3 | ||||
-rw-r--r-- | sys/arch/i386/i386/pmap.c | 13 | ||||
-rw-r--r-- | sys/arch/i386/i386/pmapae.c | 15 | ||||
-rw-r--r-- | sys/arch/i386/include/pmap.h | 3 | ||||
-rw-r--r-- | sys/arch/m88k/include/pmap.h | 3 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/pmap.c | 18 | ||||
-rw-r--r-- | sys/arch/powerpc/include/pmap.h | 3 | ||||
-rw-r--r-- | sys/arch/powerpc64/powerpc64/pmap.c | 8 | ||||
-rw-r--r-- | sys/arch/riscv64/riscv64/pmap.c | 9 | ||||
-rw-r--r-- | sys/arch/sh/include/pmap.h | 3 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/pmap.c | 15 | ||||
-rw-r--r-- | sys/uvm/uvm_map.c | 36 | ||||
-rw-r--r-- | sys/uvm/uvm_pmap.h | 5 |
20 files changed, 23 insertions, 185 deletions
diff --git a/share/man/man9/pmap.9 b/share/man/man9/pmap.9 index e63db86c971..e2c5c1ed56b 100644 --- a/share/man/man9/pmap.9 +++ b/share/man/man9/pmap.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: pmap.9,v 1.19 2019/12/16 10:34:04 mpi Exp $ +.\" $OpenBSD: pmap.9,v 1.20 2023/04/13 15:23:21 miod Exp $ .\" .\" Copyright (c) 2001, 2002, 2003 CubeSoft Communications, Inc. .\" <http://www.csoft.org> @@ -24,7 +24,7 @@ .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: December 16 2019 $ +.Dd $Mdocdate: April 13 2023 $ .Dt PMAP_INIT 9 .Os .Sh NAME @@ -49,8 +49,7 @@ .Nm pmap_growkernel , .Nm pmap_update , .Nm pmap_collect , -.Nm pmap_virtual_space , -.Nm pmap_copy +.Nm pmap_virtual_space .Nd machine dependent interface to the MMU .Sh SYNOPSIS .In machine/pmap.h @@ -366,9 +365,6 @@ it contains no valid mappings. .Fn pmap_collect "pmap_t pmap" .Ft void .Fn pmap_virtual_space "vaddr_t *vstartp" "vaddr_t *vendp" -.Ft void -.Fn pmap_copy "pmap_t dst_pmap" "pmap_t src_pmap" "vaddr_t dst_addr" \ - "vsize_t len" "vaddr_t src_addr" .nr nS 0 .Pp Wired memory allocation before the virtual memory system is bootstrapped @@ -398,26 +394,6 @@ is not expected to be used for some time, giving the module a chance to prioritize. The initial bounds of the kernel virtual address space are returned by .Fn pmap_virtual_space . -.Pp -The -.Fn pmap_copy -function copies the range specified by -.Fa src_addr -and -.Fa src_len -from -.Fa src_pmap -to the range described by -.Fa dst_addr -and -.Fa dst_len -in -.Fa dst_map . -.Fn pmap_copy -is called during a -.Xr fork 2 -operation to give the child process an initial set of low-level -mappings. .Sh SEE ALSO .Xr fork 2 , .Xr uvm_init 9 diff --git a/sys/arch/alpha/alpha/pmap.c b/sys/arch/alpha/alpha/pmap.c index e07a65e3be7..695ca6f090d 100644 --- a/sys/arch/alpha/alpha/pmap.c +++ b/sys/arch/alpha/alpha/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.90 2023/04/11 00:45:07 jsg Exp $ */ +/* $OpenBSD: pmap.c,v 1.91 2023/04/13 15:23:21 miod Exp $ */ /* $NetBSD: pmap.c,v 1.154 2000/12/07 22:18:55 thorpej Exp $ */ /*- @@ -2017,17 +2017,6 @@ pmap_extract(pmap_t pmap, vaddr_t va, paddr_t *pap) } /* - * pmap_copy: [ INTERFACE ] - * - * Copy the mapping range specified by src_addr/len - * from the source map to the range dst_addr/len - * in the destination map. - * - * This routine is only advisory and need not do anything. - */ -/* call deleted in <machine/pmap.h> */ - -/* * pmap_collect: [ INTERFACE ] * * Garbage collects the physical map system for pages which are no diff --git a/sys/arch/alpha/include/pmap.h b/sys/arch/alpha/include/pmap.h index 0269bd3d06e..5eddbfad573 100644 --- a/sys/arch/alpha/include/pmap.h +++ b/sys/arch/alpha/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.44 2023/02/06 11:16:22 miod Exp $ */ +/* $OpenBSD: pmap.h,v 1.45 2023/04/13 15:23:21 miod Exp $ */ /* $NetBSD: pmap.h,v 1.37 2000/11/19 03:16:35 thorpej Exp $ */ /*- @@ -155,7 +155,6 @@ void pmap_do_tlb_shootdown(struct cpu_info *, struct trapframe *); #define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count) #define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count) -#define pmap_copy(dp, sp, da, l, sa) /* nothing */ #define pmap_update(pmap) /* nothing (yet) */ #define pmap_proc_iflush(p, va, len) /* nothing */ diff --git a/sys/arch/amd64/amd64/pmap.c b/sys/arch/amd64/amd64/pmap.c index c6c4ebc1b0f..a5d2e901ac1 100644 --- a/sys/arch/amd64/amd64/pmap.c +++ b/sys/arch/amd64/amd64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.163 2023/04/11 00:45:07 jsg Exp $ */ +/* $OpenBSD: pmap.c,v 1.164 2023/04/13 15:23:21 miod Exp $ */ /* $NetBSD: pmap.c,v 1.3 2003/05/08 18:13:13 thorpej Exp $ */ /* @@ -2257,17 +2257,6 @@ pmap_collect(struct pmap *pmap) } #endif -/* - * pmap_copy: copy mappings from one pmap to another - * - * => optional function - * void pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr) - */ - -/* - * defined as macro in pmap.h - */ - void pmap_enter_special(vaddr_t va, paddr_t pa, vm_prot_t prot) { diff --git a/sys/arch/amd64/include/pmap.h b/sys/arch/amd64/include/pmap.h index c55e06b77d2..7228d09ec59 100644 --- a/sys/arch/amd64/include/pmap.h +++ b/sys/arch/amd64/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.85 2023/01/31 15:18:54 deraadt Exp $ */ +/* $OpenBSD: pmap.h,v 1.86 2023/04/13 15:23:21 miod Exp $ */ /* $NetBSD: pmap.h,v 1.1 2003/04/26 18:39:46 fvdl Exp $ */ /* @@ -369,7 +369,6 @@ extern const long nbpd[], nkptpmax[]; #define pmap_clear_modify(pg) pmap_clear_attrs(pg, PG_M) #define pmap_clear_reference(pg) pmap_clear_attrs(pg, PG_U) -#define pmap_copy(DP,SP,D,L,S) #define pmap_is_modified(pg) pmap_test_attrs(pg, PG_M) #define pmap_is_referenced(pg) pmap_test_attrs(pg, PG_U) #define pmap_move(DP,SP,D,L,S) diff --git a/sys/arch/arm/include/pmap.h b/sys/arch/arm/include/pmap.h index 2bf588563fe..0622bc9c253 100644 --- a/sys/arch/arm/include/pmap.h +++ b/sys/arch/arm/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.53 2023/01/31 15:18:54 deraadt Exp $ */ +/* $OpenBSD: pmap.h,v 1.54 2023/04/13 15:23:22 miod Exp $ */ /* $NetBSD: pmap.h,v 1.76 2003/09/06 09:10:46 rearnsha Exp $ */ /* @@ -240,7 +240,6 @@ extern struct pmap kernel_pmap_store; (((pg)->mdpage.pvh_attrs & PVF_REF) != 0) #define pmap_deactivate(p) do { /* nothing */ } while (0) -#define pmap_copy(dp, sp, da, l, sa) do { /* nothing */ } while (0) #define pmap_unuse_final(p) do { /* nothing */ } while (0) #define pmap_remove_holes(vm) do { /* nothing */ } while (0) diff --git a/sys/arch/arm64/arm64/pmap.c b/sys/arch/arm64/arm64/pmap.c index beb0bd7f5c0..23bb1d2e436 100644 --- a/sys/arch/arm64/arm64/pmap.c +++ b/sys/arch/arm64/arm64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.94 2023/04/09 19:48:37 kettenis Exp $ */ +/* $OpenBSD: pmap.c,v 1.95 2023/04/13 15:23:22 miod Exp $ */ /* * Copyright (c) 2008-2009,2014-2016 Dale Rahn <drahn@dalerahn.com> * @@ -1929,13 +1929,6 @@ pmap_clear_reference(struct vm_page *pg) } void -pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vaddr_t dst_addr, - vsize_t len, vaddr_t src_addr) -{ - /* NOOP */ -} - -void pmap_unwire(pmap_t pm, vaddr_t va) { struct pte_desc *pted; diff --git a/sys/arch/hppa/include/pmap.h b/sys/arch/hppa/include/pmap.h index be38973a76c..e536e403cd5 100644 --- a/sys/arch/hppa/include/pmap.h +++ b/sys/arch/hppa/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.54 2023/01/24 16:51:06 kettenis Exp $ */ +/* $OpenBSD: pmap.h,v 1.55 2023/04/13 15:23:22 miod Exp $ */ /* * Copyright (c) 2002-2004 Michael Shalayeff @@ -102,7 +102,6 @@ struct vm_page *pmap_unmap_direct(vaddr_t); #define pmap_kernel() (&kernel_pmap_store) #define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count) #define pmap_update(pm) (void)(pm) -#define pmap_copy(dpmap,spmap,da,len,sa) #define PG_PMAP_MOD PG_PMAP0 /* modified */ #define PG_PMAP_REF PG_PMAP1 /* referenced */ diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c index 494425ffee2..8c66ae97579 100644 --- a/sys/arch/i386/i386/pmap.c +++ b/sys/arch/i386/i386/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.221 2023/04/11 00:45:07 jsg Exp $ */ +/* $OpenBSD: pmap.c,v 1.222 2023/04/13 15:23:22 miod Exp $ */ /* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */ /* @@ -2263,17 +2263,6 @@ pmap_collect(struct pmap *pmap) } /* - * pmap_copy: copy mappings from one pmap to another - * - * => optional function - * void pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr) - */ - -/* - * defined as macro in pmap.h - */ - -/* * pmap_enter: enter a mapping into a pmap * * => must be done "now" ... no lazy-evaluation diff --git a/sys/arch/i386/i386/pmapae.c b/sys/arch/i386/i386/pmapae.c index b0d7920cacd..e2f6c05a5e5 100644 --- a/sys/arch/i386/i386/pmapae.c +++ b/sys/arch/i386/i386/pmapae.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmapae.c,v 1.69 2023/04/11 00:45:07 jsg Exp $ */ +/* $OpenBSD: pmapae.c,v 1.70 2023/04/13 15:23:22 miod Exp $ */ /* * Copyright (c) 2006-2008 Michael Shalayeff @@ -820,8 +820,6 @@ pmap_bootstrap_pae(void) * => we should not be holding any pv_head locks (in case we are forced * to call pmap_steal_ptp()) * => we may need to lock pv_head's if we have to steal a PTP - * => just_try: true if we want a PTP, but not enough to steal one - * from another pmap (e.g. during optional functions like pmap_copy) */ struct vm_page * @@ -1672,17 +1670,6 @@ pmap_unwire_pae(struct pmap *pmap, vaddr_t va) } /* - * pmap_copy: copy mappings from one pmap to another - * - * => optional function - * void pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr) - */ - -/* - * defined as macro in pmap.h - */ - -/* * pmap_enter: enter a mapping into a pmap * * => must be done "now" ... no lazy-evaluation diff --git a/sys/arch/i386/include/pmap.h b/sys/arch/i386/include/pmap.h index 2ce9335ba5b..7c2f8f4c95c 100644 --- a/sys/arch/i386/include/pmap.h +++ b/sys/arch/i386/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.92 2023/01/31 15:18:54 deraadt Exp $ */ +/* $OpenBSD: pmap.h,v 1.93 2023/04/13 15:23:22 miod Exp $ */ /* $NetBSD: pmap.h,v 1.44 2000/04/24 17:18:18 thorpej Exp $ */ /* @@ -205,7 +205,6 @@ extern struct pool pmap_pv_pool; #define pmap_clear_modify(pg) pmap_clear_attrs(pg, PG_M) #define pmap_clear_reference(pg) pmap_clear_attrs(pg, PG_U) -#define pmap_copy(DP,SP,D,L,S) #define pmap_is_modified(pg) pmap_test_attrs(pg, PG_M) #define pmap_is_referenced(pg) pmap_test_attrs(pg, PG_U) #define pmap_valid_entry(E) ((E) & PG_V) /* is PDE or PTE valid? */ diff --git a/sys/arch/m88k/include/pmap.h b/sys/arch/m88k/include/pmap.h index 216f11c8934..746ed8ec8dc 100644 --- a/sys/arch/m88k/include/pmap.h +++ b/sys/arch/m88k/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.28 2023/02/12 07:02:43 aoyama Exp $ */ +/* $OpenBSD: pmap.h,v 1.29 2023/04/13 15:23:22 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1991 Carnegie Mellon University @@ -51,7 +51,6 @@ extern apr_t kernel_apr, userland_apr; #define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count) #define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count) -#define pmap_copy(dp,sp,d,l,s) do { /* nothing */ } while (0) #define pmap_update(pmap) do { /* nothing */ } while (0) #define pmap_clear_modify(pg) pmap_unsetbit(pg, PG_M) diff --git a/sys/arch/mips64/mips64/pmap.c b/sys/arch/mips64/mips64/pmap.c index 7369e4fa655..756fad478f3 100644 --- a/sys/arch/mips64/mips64/pmap.c +++ b/sys/arch/mips64/mips64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.124 2023/01/11 03:19:52 visa Exp $ */ +/* $OpenBSD: pmap.c,v 1.125 2023/04/13 15:23:22 miod Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -1407,22 +1407,6 @@ pmap_extract(pmap_t pmap, vaddr_t va, paddr_t *pap) } /* - * Copy the range specified by src_addr/len - * from the source map to the range dst_addr/len - * in the destination map. - * - * This routine is only advisory and need not do anything. - */ -void -pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vaddr_t dst_addr, vsize_t len, - vaddr_t src_addr) -{ - - DPRINTF(PDB_FOLLOW,("pmap_copy(%p, %p, %p, 0x%lx, %p)\n", - dst_pmap, src_pmap, (void *)dst_addr, len, (void *)src_addr)); -} - -/* * pmap_zero_page zeros the specified (machine independent) page. */ void diff --git a/sys/arch/powerpc/include/pmap.h b/sys/arch/powerpc/include/pmap.h index 2d404a2cbf9..d7bcfd44850 100644 --- a/sys/arch/powerpc/include/pmap.h +++ b/sys/arch/powerpc/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.63 2023/01/31 15:18:55 deraadt Exp $ */ +/* $OpenBSD: pmap.h,v 1.64 2023/04/13 15:23:22 miod Exp $ */ /* $NetBSD: pmap.h,v 1.1 1996/09/30 16:34:29 ws Exp $ */ /*- @@ -148,7 +148,6 @@ int pmap_copyinsn(pmap_t, vaddr_t, uint32_t *); void pmap_real_memory(vaddr_t *start, vsize_t *size); int pte_spill_v(struct pmap *pm, u_int32_t va, u_int32_t dsisr, int exec_fault); -#define pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr) ; int reserve_dumppages(caddr_t p); #define pmap_unuse_final(p) /* nothing */ diff --git a/sys/arch/powerpc64/powerpc64/pmap.c b/sys/arch/powerpc64/powerpc64/pmap.c index a5615dc8bda..3e17df7ec4e 100644 --- a/sys/arch/powerpc64/powerpc64/pmap.c +++ b/sys/arch/powerpc64/powerpc64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.59 2023/01/25 09:53:53 kettenis Exp $ */ +/* $OpenBSD: pmap.c,v 1.60 2023/04/13 15:23:22 miod Exp $ */ /* * Copyright (c) 2015 Martin Pieuchot @@ -1047,12 +1047,6 @@ pmap_init(void) pmap_initialized = 1; } -void -pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vaddr_t dst_addr, - vsize_t len, vaddr_t src_addr) -{ -} - int pmap_enter(pmap_t pm, vaddr_t va, paddr_t pa, vm_prot_t prot, int flags) { diff --git a/sys/arch/riscv64/riscv64/pmap.c b/sys/arch/riscv64/riscv64/pmap.c index 47a3fe548ea..42e553ec2ce 100644 --- a/sys/arch/riscv64/riscv64/pmap.c +++ b/sys/arch/riscv64/riscv64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.29 2023/01/11 11:10:25 kettenis Exp $ */ +/* $OpenBSD: pmap.c,v 1.30 2023/04/13 15:23:22 miod Exp $ */ /* * Copyright (c) 2019-2020 Brian Bamsch <bbamsch@google.com> @@ -1862,13 +1862,6 @@ pmap_clear_reference(struct vm_page *pg) } void -pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vaddr_t dst_addr, - vsize_t len, vaddr_t src_addr) -{ - /* NOOP */ -} - -void pmap_unwire(pmap_t pm, vaddr_t va) { struct pte_desc *pted; diff --git a/sys/arch/sh/include/pmap.h b/sys/arch/sh/include/pmap.h index 0b31ed83163..32e9e2c9a60 100644 --- a/sys/arch/sh/include/pmap.h +++ b/sys/arch/sh/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.19 2023/03/08 04:43:07 guenther Exp $ */ +/* $OpenBSD: pmap.h,v 1.20 2023/04/13 15:23:22 miod Exp $ */ /* $NetBSD: pmap.h,v 1.28 2006/04/10 23:12:11 uwe Exp $ */ /*- @@ -65,7 +65,6 @@ void pmap_bootstrap(void); #define pmap_kernel() (&__pmap_kernel) #define pmap_deactivate(pmap) do { /* nothing */ } while (0) #define pmap_update(pmap) do { /* nothing */ } while (0) -#define pmap_copy(dp,sp,d,l,s) do { /* nothing */ } while (0) #define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count) #define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count) diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c index e067df18006..d6060d4f729 100644 --- a/sys/arch/sparc64/sparc64/pmap.c +++ b/sys/arch/sparc64/sparc64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.110 2023/01/24 07:26:34 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.111 2023/04/13 15:23:22 miod Exp $ */ /* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */ /* * @@ -1528,19 +1528,6 @@ pmap_release(struct pmap *pm) } /* - * Copy the range specified by src_addr/len - * from the source map to the range dst_addr/len - * in the destination map. - * - * This routine is only advisory and need not do anything. - */ -void -pmap_copy(struct pmap *dst_pmap, struct pmap *src_pmap, vaddr_t dst_addr, - vsize_t len, vaddr_t src_addr) -{ -} - -/* * Garbage collects the physical map system for * pages which are no longer used. * Success need not be guaranteed -- that is, there diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index 68bd274b934..d73835e0067 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.c,v 1.314 2023/04/10 04:21:20 jsg Exp $ */ +/* $OpenBSD: uvm_map.c,v 1.315 2023/04/13 15:23:23 miod Exp $ */ /* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */ /* @@ -3716,15 +3716,6 @@ uvm_mapent_forkshared(struct vmspace *new_vm, struct vm_map *new_map, old_entry->end - old_entry->start, 0, old_entry->protection, old_entry->max_protection, old_map, old_entry, dead); - /* - * pmap_copy the mappings: this routine is optional - * but if it is there it will reduce the number of - * page faults in the new proc. - */ - if (!UVM_ET_ISHOLE(new_entry)) - pmap_copy(new_map->pmap, old_map->pmap, new_entry->start, - (new_entry->end - new_entry->start), new_entry->start); - return (new_entry); } @@ -3805,8 +3796,6 @@ uvm_mapent_forkcopy(struct vmspace *new_vm, struct vm_map *new_map, * resolve all copy-on-write faults now * (note that there is nothing to do if * the old mapping does not have an amap). - * XXX: is it worthwhile to bother with - * pmap_copy in this case? */ if (old_entry->aref.ar_amap) amap_cow_now(new_map, new_entry); @@ -3821,12 +3810,7 @@ uvm_mapent_forkcopy(struct vmspace *new_vm, struct vm_map *new_map, * fork operation. * * if we do not write-protect the parent, then - * we must be sure to write-protect the child - * after the pmap_copy() operation. - * - * XXX: pmap_copy should have some way of telling - * us that it didn't do anything so we can avoid - * calling pmap_protect needlessly. + * we must be sure to write-protect the child. */ if (!UVM_ET_ISNEEDSCOPY(old_entry)) { if (old_entry->max_protection & PROT_WRITE) { @@ -3854,15 +3838,6 @@ uvm_mapent_forkcopy(struct vmspace *new_vm, struct vm_map *new_map, else protect_child = FALSE; } - /* - * copy the mappings - * XXX: need a way to tell if this does anything - */ - if (!UVM_ET_ISHOLE(new_entry)) - pmap_copy(new_map->pmap, old_map->pmap, - new_entry->start, - (old_entry->end - old_entry->start), - old_entry->start); /* protect the child's mappings if necessary */ if (protect_child) { @@ -4526,13 +4501,6 @@ uvm_map_extract(struct vm_map *srcmap, vaddr_t start, vsize_t len, newentry->protection != PROT_NONE) newentry->protection = newentry->max_protection; newentry->protection &= ~PROT_EXEC; - - /* - * Step 2: perform pmap copy. - * (Doing this in the loop saves one RB traversal.) - */ - pmap_copy(kernel_map->pmap, srcmap->pmap, - cp_start - start + dstaddr, cp_len, cp_start); } pmap_update(kernel_map->pmap); diff --git a/sys/uvm/uvm_pmap.h b/sys/uvm/uvm_pmap.h index 8e31a5e0527..c5507ca17a3 100644 --- a/sys/uvm/uvm_pmap.h +++ b/sys/uvm/uvm_pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pmap.h,v 1.32 2023/01/01 19:49:18 miod Exp $ */ +/* $OpenBSD: uvm_pmap.h,v 1.33 2023/04/13 15:23:23 miod Exp $ */ /* $NetBSD: uvm_pmap.h,v 1.1 2000/06/27 09:00:14 mrg Exp $ */ /* @@ -128,9 +128,6 @@ boolean_t pmap_clear_reference(struct vm_page *); #if !defined(pmap_collect) && defined(__HAVE_PMAP_COLLECT) void pmap_collect(pmap_t); #endif -#if !defined(pmap_copy) -void pmap_copy(pmap_t, pmap_t, vaddr_t, vsize_t, vaddr_t); -#endif #if !defined(pmap_copy_page) void pmap_copy_page(struct vm_page *, struct vm_page *); #endif |