Subject: Re: tsleep while cold can be avoided!
To: None <pk@cs.few.eur.nl>
From: Gordon W. Ross <gwr@mc.com>
List: tech-kern
Date: 03/26/1997 12:45:22
> From: Paul Kranenburg <pk@cs.few.eur.nl>
> Date: Wed, 26 Mar 1997 01:14:00 +0100 (MET)
> > > Sounds OK to me. But given Jason's semi-recent changes to a more
> > > uniform and MI setroot/conf/swapconf, does this even need to be
> > > CPU-dependent? Can it be made MI?
> >
> > [snip]
> > Perhaps we could insert three functions before the vfs_mountroot
> > call, like this: (instead of just the one shown previously)
> > cpu_rootconf();
> > cpu_swapconf();
> > cpu_dumpconf();
> >
> > and put the findroot/setroot stuff in cpu_rootconf(). Whatever.
>
> Looks like swapconf()/dumpconf() usage is the same on every port
> (as it should be), so you might as well call those directly from
> main(). (I guess this the `MI' thing Jonathan was aiming at..)
>
> -pk
I looked some more, and swapconf() is common code (kern_subr.c)
but rootconf and dumpconf() have some necessary variations.
(I'll assume cpu prefixed names for the MD functions.)
Is it better to call these all from main like this?
*** init_main.c.orig Mon Feb 3 11:11:20 1997
--- init_main.c Wed Mar 26 12:34:06 1997
***************
*** 319,324 ****
--- 319,329 ----
roundrobin(NULL);
schedcpu(NULL);
+ /* Determine the root/swap/dump devices, etc. */
+ cpu_rootconf(); /* was tail of configure() */
+ swapconf();
+ cpu_dumpconf(); /* was dumpconf() */
+
/* Mount the root file system. */
do {
domountroothook();