Subject: Re: uvm_km_valloc_align() and USPACE (Re: CVS commit: syssrc)
To: None <tech-kern@netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-kern
Date: 12/10/2000 19:49:14
Current sources are still broken on ports which have UPAGES == 3
(port-mac68k/11673 etc.), so I would like to fix this problem.
thorpej@zembu.com wrote:
> > Index: kern/kern_fork.c
> > ===================================================================
> > RCS file: /cvsroot/syssrc/sys/kern/kern_fork.c,v
> > retrieving revision 1.77
> > diff -u -r1.77 kern_fork.c
> > --- kern/kern_fork.c 2000/11/27 04:36:41 1.77
> > +++ kern/kern_fork.c 2000/11/30 17:02:27
> > @@ -65,6 +65,10 @@
> >
> > #include <uvm/uvm_extern.h>
> >
> > +#ifndef USPACE_ALIGN
> > +#define USPACE_ALIGN NBPG
> > +#endif
> > +
>
> s/NBPG/PAGE_SIZE/ please.
>
> I would also prefer that USPACE_ALIGN simply be defined in all vmparam.h
> files.
Logically, USPACE should be PAGE_SIZE (or NBPG) aligned,
but the address returned by uvm_map_findspace() is always
PAGE_SIZE aligned, and in the previous version
uvm_km_valloc() called uvm_map() with align == 0 .
Then, for now, I would like to add:
#ifndef USPACE_ALIGN
#define USPACE_ALIGN 0
#endif
around uaddr assignment statement in kern/kern_fork.c
and add mips specific USPACE_ALIGN definition to
mips/include/vmparam.h. Comments?
> > I guess USPACE_ALIGN is cpu specific, but we don't have
> > powerpc/include/vmparam.h nor m68k/include/vmparam.h.
> > Are these files needed?
>
> I think so, and we should move as many of the common constants into those
> files as possible.
I checked m68k case, but there are few common values for all m68k ports.
They have different pmap, NBPG and VM addresses etc.
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp