Subject: Re: uvm_map_findspace alignment fallback
To: None <petrov@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 03/25/2004 11:01:24
> > Index: uvm_bio.c
> > ===================================================================
> > --- uvm_bio.c (revision 641)
> > +++ uvm_bio.c (working copy)
> > @@ -208,7 +208,11 @@ ubc_init(void)
> > ubc_nwins << ubc_winshift, &ubc_object.uobj, 0, (vsize_t)va,
> > UVM_MAPFLAG(UVM_PROT_ALL, UVM_PROT_ALL, UVM_INH_NONE,
> > UVM_ADV_RANDOM, UVM_FLAG_NOMERGE)) != 0) {
> > - panic("ubc_init: failed to map ubc_object");
> > + if (uvm_map(kernel_map, (vaddr_t *)&ubc_object.kva,
> > + ubc_nwins << ubc_winshift, &ubc_object.uobj, 0, 0,
> > + UVM_MAPFLAG(UVM_PROT_ALL, UVM_PROT_ALL, UVM_INH_NONE,
> > + UVM_ADV_RANDOM, UVM_FLAG_NOMERGE)) != 0)
> > + panic("ubc_init: failed to map ubc_object");
> > }
> > UVMHIST_INIT(ubchist, 300);
> > }
>
> va was set explicitly to 1. Why this change is needed?
it might not be 1, if you have PMAP_PREFER.
YAMAMOTO Takashi