On Mon, Mar 22, 2021 at 11:50:00AM +0100, Mark Kettenis wrote:
> > Date: Mon, 22 Mar 2021 11:29:52 +0100
> > From: Martin Pieuchot <[email protected]>
> >
> > Convert the last MI uvm_km_zalloc(9) to km_alloc(9), ok?
>
> Also needs some careful testing on multiple architectures.
I did run both diffs through a full regress on armv7, arm64, amd64,
i386 a while ago. No fallout.
bluhm
>
> > Index: uvm/uvm_page.c
> > ===================================================================
> > RCS file: /cvs/src/sys/uvm/uvm_page.c,v
> > retrieving revision 1.155
> > diff -u -p -r1.155 uvm_page.c
> > --- uvm/uvm_page.c 19 Jan 2021 13:21:36 -0000 1.155
> > +++ uvm/uvm_page.c 22 Mar 2021 10:23:39 -0000
> > @@ -542,8 +542,8 @@ uvm_page_physload(paddr_t start, paddr_t
> >
> > npages = end - start; /* # of pages */
> >
> > - pgs = (struct vm_page *)uvm_km_zalloc(kernel_map,
> > - npages * sizeof(*pgs));
> > + pgs = km_alloc(npages * sizeof(*pgs), &kv_any, &kp_zero,
> > + &kd_waitok);
> > if (pgs == NULL) {
> > printf("uvm_page_physload: can not malloc vm_page "
> > "structs for segment\n");
> >
> >