Subject: Re: "swap generic"
To: Brad Spencer <brad@anduin.eldar.org>
From: matthew green <mrg@eterna.com.au>
List: port-sparc
Date: 07/29/1996 15:39:46
   
   I find this all a bit odd.... With the i386 port, one can swap to
   multiple items by listing them on the config line.

   I would have thought that 'config .... swap on nfs and sd0b' would
   have gotten it right, also....  Except that in this case I don't
   believe it ever makes it to 'init'.

the behaviour of "swap generic" is a port-dependant thing.  look at the
swapgeneric.c files that each port has, and you'll see why the i386 and
the sparc are different:

i386/swapgeneric.c has:
struct  swdevt swdevt[] = {
        { NODEV,        1,      0 },
	{ NODEV,        0,      0 },
};

sparc/swapgeneric.c has:
struct  swdevt swdevt[] = {
        { makedev(7, 1), 0, 0 },        /* sd0b */
        { makedev(7, 9), 0, 0 },        /* sd1b */
        { makedev(7, 17), 0, 0 },       /* sd2b */
        { makedev(7, 25), 0, 0 },       /* sd3b */
        { makedev(7, 33), 0, 0 },       /* sd4b */
        { makedev(7, 41), 0, 0 },       /* sd5b */
        { makedev(7, 49), 0, 0 },       /* sd6b */
        { makedev(7, 57), 0, 0 },       /* sd7b */
        { NODEV, 0, 0 }
};

ie, a "generic" i386 kernel can swap to two devices of undefined
type, and the sparc defaults to letting you swap to sd[01234567]b.

as "swap generic" on the sparc lets you also swap over NFS, you
must be able to change at least the first one forcibly.

.mrg.