From: Philip Guenther Subject: Re: Kill unused pmap_collect() To: tech@openbsd.org Date: Sat, 2 Nov 2024 13:11:04 -0700 ok guenther@ On Sat, Nov 2, 2024 at 12:44 AM Martin Pieuchot wrote: > > __HAVE_PMAP_COLLECT is not defined on i386 and amd64, these functions > are unused. > > ok? > > Index: arch/i386/i386/pmap.c > =================================================================== > RCS file: /cvs/src/sys/arch/i386/i386/pmap.c,v > diff -u -p -r1.224 pmap.c > --- arch/i386/i386/pmap.c 1 Nov 2024 12:07:53 -0000 1.224 > +++ arch/i386/i386/pmap.c 2 Nov 2024 07:35:24 -0000 > @@ -2254,25 +2254,6 @@ pmap_unwire_86(struct pmap *pmap, vaddr_ > } > > /* > - * pmap_collect: free resources held by a pmap > - * > - * => optional function. > - * => called when a process is swapped out to free memory. > - */ > - > -void > -pmap_collect(struct pmap *pmap) > -{ > - /* > - * free all of the pt pages by removing the physical mappings > - * for its entire address space. > - */ > - > - pmap_do_remove(pmap, VM_MIN_ADDRESS, VM_MAX_ADDRESS, > - PMAP_REMOVE_SKIPWIRED); > -} > - > -/* > * pmap_enter: enter a mapping into a pmap > * > * => must be done "now" ... no lazy-evaluation > Index: arch/amd64/amd64/pmap.c > =================================================================== > RCS file: /cvs/src/sys/arch/amd64/amd64/pmap.c,v > diff -u -p -r1.177 pmap.c > --- arch/amd64/amd64/pmap.c 2 Oct 2024 18:18:27 -0000 1.177 > +++ arch/amd64/amd64/pmap.c 2 Nov 2024 07:36:04 -0000 > @@ -2266,27 +2268,6 @@ pmap_unwire(struct pmap *pmap, vaddr_t v > #endif > } > > -#if 0 > -/* > - * pmap_collect: free resources held by a pmap > - * > - * => optional function. > - * => called when a process is swapped out to free memory. > - */ > - > -void > -pmap_collect(struct pmap *pmap) > -{ > - /* > - * free all of the pt pages by removing the physical mappings > - * for its entire address space. > - */ > - > - pmap_do_remove(pmap, VM_MIN_ADDRESS, VM_MAX_ADDRESS, > - PMAP_REMOVE_SKIPWIRED); > -} > -#endif > - > void > pmap_enter_special(vaddr_t va, paddr_t pa, vm_prot_t prot) > { >