diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-08-25 12:29:57 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-08-25 12:29:57 +0000 |
commit | 4446faacfdb03d1b4c25f86bfcc88a0a29ebbbf2 (patch) | |
tree | 4573f4756c7d554ad33fe88b519cac54ea21ba76 /sys/arch | |
parent | e4ecd0bb57d63750c2289c41dd791964aed1d4a0 (diff) |
Our diskconf needs process context. Do just like i386, move
setroot, swapconf and dumpconf into a hook that main runs after scheduling
has been enabled.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc64/sparc64/autoconf.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c index f644bd30387..3f133df7652 100644 --- a/sys/arch/sparc64/sparc64/autoconf.c +++ b/sys/arch/sparc64/sparc64/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.5 2001/08/23 15:20:48 art Exp $ */ +/* $OpenBSD: autoconf.c,v 1.6 2001/08/25 12:29:56 art Exp $ */ /* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */ /* @@ -117,6 +117,7 @@ static void mainbus_attach __P((struct device *, struct device *, void *)); static int getstr __P((char *, int)); void setroot __P((void)); void swapconf __P((void)); +void diskconf __P((void)); static struct device *getdisk __P((char *, int, int, dev_t *)); static int findblkmajor __P((struct device *)); @@ -533,16 +534,23 @@ cpu_configure() (void)spl0(); + md_diskconf = diskconf; + cold = 0; +} + +void +diskconf(void) +{ setroot(); swapconf(); - cold = 0; + dumpconf(); } void swapconf() { - register struct swdevt *swp; - register int nblks; + struct swdevt *swp; + int nblks; for (swp = swdevt; swp->sw_dev != NODEV; swp++) if (bdevsw[major(swp->sw_dev)].d_psize) { @@ -553,7 +561,6 @@ swapconf() swp->sw_nblks = nblks; swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); } - dumpconf(); } void @@ -655,7 +662,7 @@ gotswap: rootdev = nrootdev; dumpdev = nswapdev; swdevt[0].sw_dev = nswapdev; - /* swdevt[1].sw_dev = NODEV; */ + swdevt[1].sw_dev = NODEV; } else if (mountroot == NULL) { @@ -750,7 +757,6 @@ gotroot: (*mrhp->mr_func)(NULL); break; } - } struct nam2blk { |