diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-27 18:31:13 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-27 18:31:13 +0000 |
commit | 2c83fdf7a5b01f033c7a583c25a774c665b25848 (patch) | |
tree | 6c1274fecc59bcb6dfeae362e8697d1c1ef94e32 /sys/arch | |
parent | 1728d3241352f3c138c9ba4ca3293d8875e4bf63 (diff) |
Remove unused sw_nblks field of struct swdevt. Then, remove swapconf()
which duplicates work done by uvm_swap_init().
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/alpha/alpha/autoconf.c | 29 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/autoconf.c | 22 | ||||
-rw-r--r-- | sys/arch/cats/cats/autoconf.c | 31 | ||||
-rw-r--r-- | sys/arch/hp300/hp300/autoconf.c | 29 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/autoconf.c | 27 | ||||
-rw-r--r-- | sys/arch/hppa64/hppa64/autoconf.c | 27 | ||||
-rw-r--r-- | sys/arch/i386/i386/autoconf.c | 28 | ||||
-rw-r--r-- | sys/arch/luna88k/luna88k/autoconf.c | 27 | ||||
-rw-r--r-- | sys/arch/mac68k/mac68k/autoconf.c | 29 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/autoconf.c | 27 | ||||
-rw-r--r-- | sys/arch/mvme68k/mvme68k/autoconf.c | 25 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/autoconf.c | 26 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/autoconf.c | 27 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/autoconf.c | 24 | ||||
-rw-r--r-- | sys/arch/solbourne/solbourne/autoconf.c | 26 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/autoconf.c | 26 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/autoconf.c | 21 | ||||
-rw-r--r-- | sys/arch/vax/vax/autoconf.c | 7 | ||||
-rw-r--r-- | sys/arch/vax/vax/rootfil.c | 28 | ||||
-rw-r--r-- | sys/arch/zaurus/zaurus/autoconf.c | 31 |
20 files changed, 30 insertions, 487 deletions
diff --git a/sys/arch/alpha/alpha/autoconf.c b/sys/arch/alpha/alpha/autoconf.c index 14015b55556..59ce11c6fdd 100644 --- a/sys/arch/alpha/alpha/autoconf.c +++ b/sys/arch/alpha/alpha/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.25 2005/04/21 00:15:42 deraadt Exp $ */ +/* $OpenBSD: autoconf.c,v 1.26 2005/12/27 18:31:05 miod Exp $ */ /* $NetBSD: autoconf.c,v 1.16 1996/11/13 21:13:04 cgd Exp $ */ /* @@ -67,7 +67,6 @@ char boot_dev[128]; void parse_prom_bootdev(void); int atoi(char *); void setroot(void); -void swapconf(void); static struct device *parsedisk(char *str, int len, int defpart, dev_t *devp); @@ -104,32 +103,8 @@ cpu_configure() printf("WARNING: can't figure what device matches \"%s\"\n", boot_dev); setroot(); - swapconf(); - cold = 0; -} - -/* - * Configure swap space and related parameters. - */ -void -swapconf() -{ - struct swdevt *swp; - int nblks, maj; - - for (swp = swdevt; swp->sw_dev != NODEV; swp++) { - maj = major(swp->sw_dev); - if (maj > nblkdev) - break; - if (bdevsw[maj].d_psize) { - nblks = (*bdevsw[maj].d_psize)(swp->sw_dev); - if (nblks != -1 && - (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) - swp->sw_nblks = nblks; - swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); - } - } dumpconf(); + cold = 0; } struct nam2blk { diff --git a/sys/arch/amd64/amd64/autoconf.c b/sys/arch/amd64/amd64/autoconf.c index e25094344e9..81804cbe4ff 100644 --- a/sys/arch/amd64/amd64/autoconf.c +++ b/sys/arch/amd64/amd64/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.10 2005/12/13 00:18:19 jsg Exp $ */ +/* $OpenBSD: autoconf.c,v 1.11 2005/12/27 18:31:08 miod Exp $ */ /* $NetBSD: autoconf.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */ /*- @@ -75,7 +75,6 @@ void setroot(void); void rootconf(void); -void swapconf(void); void diskconf(void); int findblkmajor(struct device *); char *findblkname(int); @@ -139,28 +138,9 @@ diskconf(void) dkcsumattach(); rootconf(); - swapconf(); dumpconf(); } -void -swapconf(void) -{ - struct swdevt *swp; - int nblks; - - for (swp = swdevt; swp->sw_dev != NODEV; swp++) { - if (bdevsw[major(swp->sw_dev)].d_psize) { - nblks = - (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev); - if (nblks != -1 && - (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) - swp->sw_nblks = nblks; - swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); - } - } -} - struct device * parsedisk(str, len, defpart, devp) char *str; diff --git a/sys/arch/cats/cats/autoconf.c b/sys/arch/cats/cats/autoconf.c index cadaa6c2bf0..c57f7d3b3f0 100644 --- a/sys/arch/cats/cats/autoconf.c +++ b/sys/arch/cats/cats/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.6 2005/11/25 02:42:25 brad Exp $ */ +/* $OpenBSD: autoconf.c,v 1.7 2005/12/27 18:31:08 miod Exp $ */ /* $NetBSD: autoconf.c,v 1.2 2001/09/05 16:17:36 matt Exp $ */ /* @@ -66,7 +66,6 @@ struct device *bootdv = NULL; int findblkmajor(struct device *dv); char * findblkname(int maj); -void swapconf(void); void rootconf(void); void diskconf(void); @@ -224,38 +223,10 @@ diskconf() #endif rootconf(); #if 0 - swapconf(); dumpconf(); #endif } -/* - * Configure swap space and related parameters. - */ -void -swapconf() -{ - register struct swdevt *swp; - register int nblks; - - for (swp = swdevt; swp->sw_dev != NODEV; swp++) { - int maj = major(swp->sw_dev); - - if (maj > nblkdev) - break; - if (bdevsw[maj].d_psize) { - nblks = (*bdevsw[maj].d_psize)(swp->sw_dev); - if (nblks != -1 && - (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) - swp->sw_nblks = nblks; - swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); - } - } -} - -void rootconf(void); -void diskconf(void); - /* * void cpu_configure() diff --git a/sys/arch/hp300/hp300/autoconf.c b/sys/arch/hp300/hp300/autoconf.c index 4c3d9817567..0b26a834fd0 100644 --- a/sys/arch/hp300/hp300/autoconf.c +++ b/sys/arch/hp300/hp300/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.33 2005/02/27 22:08:41 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.34 2005/12/27 18:31:08 miod Exp $ */ /* $NetBSD: autoconf.c,v 1.45 1999/04/10 17:31:02 kleink Exp $ */ /* @@ -167,7 +167,6 @@ ddlist_t dev_data_list_scsi; /* scsi controller dev_datas */ void diskconf(void); void setroot(void); -void swapconf(void); void findbootdev(void); void findbootdev_slave(ddlist_t *, int, int, int); void setbootdev(void); @@ -286,7 +285,7 @@ diskconf() { setroot(); - swapconf(); + dumpconf(); /* * Set bootdev based on the device we booted from. @@ -405,30 +404,6 @@ device_register(dev, aux) } } -/* - * Configure swap space and related parameters. - */ -void -swapconf() -{ - struct swdevt *swp; - int nblks, maj; - - for (swp = swdevt; swp->sw_dev != NODEV; swp++) { - maj = major(swp->sw_dev); - if (maj > nblkdev) - break; - if (bdevsw[maj].d_psize) { - nblks = (*bdevsw[maj].d_psize)(swp->sw_dev); - if (nblks != -1 && - (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) - swp->sw_nblks = nblks; - swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); - } - } - dumpconf(); -} - struct nam2blk { char *name; int maj; diff --git a/sys/arch/hppa/hppa/autoconf.c b/sys/arch/hppa/hppa/autoconf.c index 0bb5f69efdc..1c9d0ea8325 100644 --- a/sys/arch/hppa/hppa/autoconf.c +++ b/sys/arch/hppa/hppa/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.43 2005/01/17 22:33:40 mickey Exp $ */ +/* $OpenBSD: autoconf.c,v 1.44 2005/12/27 18:31:08 miod Exp $ */ /* * Copyright (c) 1998-2003 Michael Shalayeff @@ -65,7 +65,6 @@ #endif void setroot(void); -void swapconf(void); void dumpconf(void); int findblkmajor(struct device *dv); @@ -113,7 +112,6 @@ cpu_configure(void) spl0(); setroot(); - swapconf(); dumpconf(); if (cold_hook) (*cold_hook)(HPPA_COLD_HOT); @@ -172,29 +170,6 @@ heartbeat(v) #endif /* - * Configure swap space and related parameters. - */ -void -swapconf(void) -{ - struct swdevt *swp; - int nblks, maj; - - for (swp = swdevt; swp->sw_dev != NODEV; swp++) { - maj = major(swp->sw_dev); - if (maj > nblkdev) - break; - if (bdevsw[maj].d_psize) { - nblks = (*bdevsw[maj].d_psize)(swp->sw_dev); - if (nblks != -1 && - (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) - swp->sw_nblks = nblks; - swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); - } - } -} - -/* * This is called by configure to set dumplo and dumpsize. * Dumps always skip the first CLBYTES of disk space * in case there might be a disk label stored there. diff --git a/sys/arch/hppa64/hppa64/autoconf.c b/sys/arch/hppa64/hppa64/autoconf.c index 9945c275d7b..ef93254bdab 100644 --- a/sys/arch/hppa64/hppa64/autoconf.c +++ b/sys/arch/hppa64/hppa64/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.3 2005/05/25 20:49:26 mickey Exp $ */ +/* $OpenBSD: autoconf.c,v 1.4 2005/12/27 18:31:09 miod Exp $ */ /* * Copyright (c) 1998-2005 Michael Shalayeff @@ -67,7 +67,6 @@ #endif void setroot(void); -void swapconf(void); void dumpconf(void); int findblkmajor(struct device *dv); @@ -118,7 +117,6 @@ cpu_configure(void) spl0(); setroot(); - swapconf(); dumpconf(); if (cold_hook) (*cold_hook)(HPPA_COLD_HOT); @@ -177,29 +175,6 @@ heartbeat(v) #endif /* - * Configure swap space and related parameters. - */ -void -swapconf(void) -{ - struct swdevt *swp; - int nblks, maj; - - for (swp = swdevt; swp->sw_dev != NODEV; swp++) { - maj = major(swp->sw_dev); - if (maj > nblkdev) - break; - if (bdevsw[maj].d_psize) { - nblks = (*bdevsw[maj].d_psize)(swp->sw_dev); - if (nblks != -1 && - (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) - swp->sw_nblks = nblks; - swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); - } - } -} - -/* * This is called by configure to set dumplo and dumpsize. * Dumps always skip the first CLBYTES of disk space * in case there might be a disk label stored there. diff --git a/sys/arch/i386/i386/autoconf.c b/sys/arch/i386/i386/autoconf.c index e575085af43..1348cd11361 100644 --- a/sys/arch/i386/i386/autoconf.c +++ b/sys/arch/i386/i386/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.55 2005/01/01 02:57:36 millert Exp $ */ +/* $OpenBSD: autoconf.c,v 1.56 2005/12/27 18:31:09 miod Exp $ */ /* $NetBSD: autoconf.c,v 1.20 1996/05/03 19:41:56 christos Exp $ */ /*- @@ -71,7 +71,6 @@ int findblkmajor(struct device *dv); char *findblkname(int); void rootconf(void); -void swapconf(void); void setroot(void); void diskconf(void); @@ -172,34 +171,9 @@ diskconf() dkcsumattach(); rootconf(); - swapconf(); dumpconf(); } -/* - * Configure swap space and related parameters. - */ -void -swapconf() -{ - register struct swdevt *swp; - register int nblks; - - for (swp = swdevt; swp->sw_dev != NODEV; swp++) { - int maj = major(swp->sw_dev); - - if (maj > nblkdev) - break; - if (bdevsw[maj].d_psize) { - nblks = (*bdevsw[maj].d_psize)(swp->sw_dev); - if (nblks != -1 && - (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) - swp->sw_nblks = nblks; - swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); - } - } -} - #define DOSWAP /* change swdevt and dumpdev */ static struct { diff --git a/sys/arch/luna88k/luna88k/autoconf.c b/sys/arch/luna88k/luna88k/autoconf.c index 6996e149a5f..90474e34788 100644 --- a/sys/arch/luna88k/luna88k/autoconf.c +++ b/sys/arch/luna88k/luna88k/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.5 2005/04/30 16:42:33 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.6 2005/12/27 18:31:09 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -57,7 +57,6 @@ struct device *parsedisk(char *, int, int, dev_t *); void setroot(void); -void swapconf(void); void dumpconf(void); int findblkmajor(struct device *); struct device *getdisk(char *, int, int, dev_t *); @@ -87,33 +86,11 @@ cpu_configure() set_psr(get_psr() & ~PSR_IND); spl0(); setroot(); - swapconf(); + dumpconf(); cold = 0; } -/* - * Configure swap space and related parameters. - */ -void -swapconf() -{ - struct swdevt *swp; - int nblks; - - for (swp = swdevt; swp->sw_dev != NODEV; swp++) - if (bdevsw[major(swp->sw_dev)].d_psize) { - nblks = - (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev); - if (nblks != -1 && - (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) - swp->sw_nblks = nblks; - swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); - } - - dumpconf(); -} - struct nam2blk { char *name; int maj; diff --git a/sys/arch/mac68k/mac68k/autoconf.c b/sys/arch/mac68k/mac68k/autoconf.c index ef14b0f0859..cbbdea0e3ce 100644 --- a/sys/arch/mac68k/mac68k/autoconf.c +++ b/sys/arch/mac68k/mac68k/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.21 2005/08/01 14:49:55 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.22 2005/12/27 18:31:09 miod Exp $ */ /* $NetBSD: autoconf.c,v 1.38 1996/12/18 05:46:09 scottr Exp $ */ /* @@ -83,7 +83,6 @@ void findbootdev(void); int target_to_unit(u_long, u_long, u_long); void setroot(void); -void swapconf(void); #ifdef RAMDISK_HOOKS static struct device fakerdrootdev = { DV_DISK, {}, NULL, 0, "rd0", NULL }; @@ -101,32 +100,8 @@ cpu_configure() findbootdev(); setroot(); - swapconf(); - cold = 0; -} - -/* - * Configure swap space and related parameters. - */ -void -swapconf() -{ - struct swdevt *swp; - int nblks, maj; - - for (swp = swdevt; swp->sw_dev != NODEV ; swp++) { - maj = major(swp->sw_dev); - if (maj > nblkdev) - break; - if (bdevsw[maj].d_psize) { - nblks = (*bdevsw[maj].d_psize)(swp->sw_dev); - if (nblks != -1 && - (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) - swp->sw_nblks = nblks; - swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); - } - } dumpconf(); + cold = 0; } struct nam2blk { diff --git a/sys/arch/macppc/macppc/autoconf.c b/sys/arch/macppc/macppc/autoconf.c index 6f5813779d6..f94b782232d 100644 --- a/sys/arch/macppc/macppc/autoconf.c +++ b/sys/arch/macppc/macppc/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.21 2005/11/25 02:42:25 brad Exp $ */ +/* $OpenBSD: autoconf.c,v 1.22 2005/12/27 18:31:09 miod Exp $ */ /* * Copyright (c) 1996, 1997 Per Fogelstrom * Copyright (c) 1995 Theo de Raadt @@ -37,7 +37,7 @@ * from: Utah Hdr: autoconf.c 1.31 91/01/21 * * from: @(#)autoconf.c 8.1 (Berkeley) 6/10/93 - * $Id: autoconf.c,v 1.21 2005/11/25 02:42:25 brad Exp $ + * $Id: autoconf.c,v 1.22 2005/12/27 18:31:09 miod Exp $ */ /* @@ -62,7 +62,6 @@ struct device *parsedisk(char *, int, int, dev_t *); void setroot(void); -void swapconf(void); void dumpconf(void); int findblkmajor(struct device *); char *findblkname(int); @@ -128,32 +127,10 @@ diskconf() rootconf(); #endif setroot(); - swapconf(); dumpconf(); } /* - * Configure swap space and related parameters. - */ -void -swapconf() -{ - struct swdevt *swp; - int nblks; - - for (swp = swdevt; swp->sw_dev != NODEV; swp++) { - if (bdevsw[major(swp->sw_dev)].d_psize) { - nblks = - (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev); - if (nblks != -1 && - (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) - swp->sw_nblks = nblks; - swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); - } - } -} - -/* * Crash dump handling. */ diff --git a/sys/arch/mvme68k/mvme68k/autoconf.c b/sys/arch/mvme68k/mvme68k/autoconf.c index 75d323be0c8..2e0a726eb5c 100644 --- a/sys/arch/mvme68k/mvme68k/autoconf.c +++ b/sys/arch/mvme68k/mvme68k/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.31 2005/12/22 22:56:31 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.32 2005/12/27 18:31:09 miod Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -87,7 +87,6 @@ #include <machine/pte.h> void setroot(void); -void swapconf(void); int mainbus_print(void *, const char *); int mainbus_scan(struct device *, void *, void *); int findblkmajor(struct device *); @@ -197,7 +196,7 @@ cpu_configure() panic("autoconfig failed, no root"); setroot(); - swapconf(); + dumpconf(); cold = 0; } @@ -253,26 +252,6 @@ unmapiodev(kva, size) } /* - * Configure swap space and related parameters. - */ -void -swapconf() -{ - register struct swdevt *swp; - register int nblks; - - for (swp = swdevt; swp->sw_dev != NODEV; swp++) - if (bdevsw[major(swp->sw_dev)].d_psize) { - nblks = - (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev); - if (nblks != -1 && - (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) - swp->sw_nblks = nblks; - } - dumpconf(); -} - -/* * the rest of this file was adapted from Theo de Raadt's code in the * sparc port to nuke the "options GENERIC" stuff. */ diff --git a/sys/arch/mvme88k/mvme88k/autoconf.c b/sys/arch/mvme88k/mvme88k/autoconf.c index c3b9bd1bed8..9cb459fcbcd 100644 --- a/sys/arch/mvme88k/mvme88k/autoconf.c +++ b/sys/arch/mvme88k/mvme88k/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.31 2005/04/30 16:42:37 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.32 2005/12/27 18:31:10 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -57,7 +57,6 @@ struct device *parsedisk(char *, int, int, dev_t *); void setroot(void); -void swapconf(void); char buginchr(void); void dumpconf(void); int findblkmajor(struct device *); @@ -88,7 +87,7 @@ cpu_configure() set_psr(get_psr() & ~PSR_IND); spl0(); setroot(); - swapconf(); + dumpconf(); /* * Finally switch to the real console driver, @@ -100,27 +99,6 @@ cpu_configure() cold = 0; } -/* - * Configure swap space and related parameters. - */ -void -swapconf() -{ - struct swdevt *swp; - int nblks; - - for (swp = swdevt; swp->sw_dev != NODEV; swp++) - if (bdevsw[major(swp->sw_dev)].d_psize) { - nblks = - (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev); - if (nblks != -1 && - (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) - swp->sw_nblks = nblks; - swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); - } - dumpconf(); -} - struct nam2blk { char *name; int maj; diff --git a/sys/arch/mvmeppc/mvmeppc/autoconf.c b/sys/arch/mvmeppc/mvmeppc/autoconf.c index 5af7911b9f1..9ecee0cc060 100644 --- a/sys/arch/mvmeppc/mvmeppc/autoconf.c +++ b/sys/arch/mvmeppc/mvmeppc/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.13 2005/04/21 00:15:42 deraadt Exp $ */ +/* $OpenBSD: autoconf.c,v 1.14 2005/12/27 18:31:10 miod Exp $ */ /* * Copyright (c) 1996, 1997 Per Fogelstrom * Copyright (c) 1995 Theo de Raadt @@ -37,7 +37,7 @@ * from: Utah Hdr: autoconf.c 1.31 91/01/21 * * from: @(#)autoconf.c 8.1 (Berkeley) 6/10/93 - * $Id: autoconf.c,v 1.13 2005/04/21 00:15:42 deraadt Exp $ + * $Id: autoconf.c,v 1.14 2005/12/27 18:31:10 miod Exp $ */ /* @@ -61,7 +61,6 @@ struct device *parsedisk(char *, int, int, dev_t *); void setroot(void); -void swapconf(void); extern void dumpconf(void); int findblkmajor(struct device *); char *findblkname(int); @@ -109,28 +108,6 @@ void diskconf() { setroot(); - swapconf(); -} - -/* - * Configure swap space and related parameters. - */ -void -swapconf() -{ - struct swdevt *swp; - int nblks; - - for (swp = swdevt; swp->sw_dev != NODEV; swp++) { - if (bdevsw[major(swp->sw_dev)].d_psize) { - nblks = - (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev); - if (nblks != -1 && - (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) - swp->sw_nblks = nblks; - swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); - } - } #if 0 dumpconf(); #endif diff --git a/sys/arch/sgi/sgi/autoconf.c b/sys/arch/sgi/sgi/autoconf.c index 99568a2d8fb..09cdd9c32d5 100644 --- a/sys/arch/sgi/sgi/autoconf.c +++ b/sys/arch/sgi/sgi/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.10 2005/12/19 21:37:10 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.11 2005/12/27 18:31:10 miod Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom * Copyright (c) 1995 Theo de Raadt @@ -61,7 +61,6 @@ struct device *parsedisk(char *, int, int, dev_t *); void disk_configure(void); void rootconf(void); -void swapconf(void); extern void dumpconf(void); int findblkmajor(struct device *); struct device * getdisk(char *, int, int, dev_t *); @@ -112,31 +111,10 @@ void disk_configure() { rootconf(); - swapconf(); dumpconf(); } /* - * Configure swap space and related parameters. - */ -void -swapconf() -{ - struct swdevt *swp; - int nblks; - - for (swp = swdevt; swp->sw_dev != NODEV; swp++) { - if (bdevsw[major(swp->sw_dev)].d_psize) { - nblks = (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev); - if (nblks != -1 && (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) { - swp->sw_nblks = nblks; - } - swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); - } - } -} - -/* * the rest of this file was influenced/copied from Theo de Raadt's * code in the sparc port to nuke the "options GENERIC" stuff. */ diff --git a/sys/arch/solbourne/solbourne/autoconf.c b/sys/arch/solbourne/solbourne/autoconf.c index d002cd939f0..e118435908c 100644 --- a/sys/arch/solbourne/solbourne/autoconf.c +++ b/sys/arch/solbourne/solbourne/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.2 2005/04/21 00:15:43 deraadt Exp $ */ +/* $OpenBSD: autoconf.c,v 1.3 2005/12/27 18:31:10 miod Exp $ */ /* OpenBSD: autoconf.c,v 1.64 2005/03/23 17:10:24 miod Exp */ /* @@ -100,7 +100,6 @@ int findblkmajor(struct device *); char *findblkname(int); static struct device *getdisk(char *, int, int, dev_t *); static int mbprint(void *, const char *); -void swapconf(void); void sync_crash(void); int mainbus_match(struct device *, void *, void *); static void mainbus_attach(struct device *, struct device *, void *); @@ -319,7 +318,7 @@ cpu_configure() * parameter based on device(s) used. */ setroot(); - swapconf(); + dumpconf(); cold = 0; /* @@ -564,27 +563,6 @@ callrom() #endif } -/* - * Configure swap space and related parameters. - */ -void -swapconf() -{ - struct swdevt *swp; - int nblks; - - for (swp = swdevt; swp->sw_dev != NODEV; swp++) - if (bdevsw[major(swp->sw_dev)].d_psize) { - nblks = - (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev); - if (nblks != -1 && - (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) - swp->sw_nblks = nblks; - swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); - } - dumpconf(); -} - struct nam2blk { char *name; int maj; diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c index 3baf15d283d..2df1eb97dea 100644 --- a/sys/arch/sparc/sparc/autoconf.c +++ b/sys/arch/sparc/sparc/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.69 2005/09/25 20:05:37 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.70 2005/12/27 18:31:10 miod Exp $ */ /* $NetBSD: autoconf.c,v 1.73 1997/07/29 09:41:53 fair Exp $ */ /* @@ -107,7 +107,6 @@ char *findblkname(int); static struct device *getdisk(char *, int, int, dev_t *); static int mbprint(void *, const char *); static void crazymap(char *, int *); -void swapconf(void); void sync_crash(void); int mainbus_match(struct device *, void *, void *); static void mainbus_attach(struct device *, struct device *, void *); @@ -851,7 +850,7 @@ cpu_configure() * parameter based on device(s) used. */ setroot(); - swapconf(); + dumpconf(); cold = 0; /* @@ -1738,27 +1737,6 @@ callrom() promvec->pv_abort(); } -/* - * Configure swap space and related parameters. - */ -void -swapconf() -{ - register struct swdevt *swp; - register int nblks; - - for (swp = swdevt; swp->sw_dev != NODEV; swp++) - if (bdevsw[major(swp->sw_dev)].d_psize) { - nblks = - (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev); - if (nblks != -1 && - (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) - swp->sw_nblks = nblks; - swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); - } - dumpconf(); -} - #if 0 /* Unused */ dev_t bootdev; #endif diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c index 1dbfecb07f4..9cbd93cfa46 100644 --- a/sys/arch/sparc64/sparc64/autoconf.c +++ b/sys/arch/sparc64/sparc64/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.42 2005/10/06 19:53:40 brad Exp $ */ +/* $OpenBSD: autoconf.c,v 1.43 2005/12/27 18:31:11 miod Exp $ */ /* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */ /* @@ -111,7 +111,6 @@ int mainbus_match(struct device *, void *, void *); static void mainbus_attach(struct device *, struct device *, void *); static int getstr(char *, int); void setroot(void); -void swapconf(void); void diskconf(void); static struct device *getdisk(char *, int, int, dev_t *); int findblkmajor(struct device *); @@ -503,28 +502,10 @@ void diskconf(void) { setroot(); - swapconf(); dumpconf(); } void -swapconf() -{ - struct swdevt *swp; - int nblks; - - for (swp = swdevt; swp->sw_dev != NODEV; swp++) - if (bdevsw[major(swp->sw_dev)].d_psize) { - nblks = - (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev); - if (nblks != -1 && - (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) - swp->sw_nblks = nblks; - swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); - } -} - -void setroot() { struct swdevt *swp; diff --git a/sys/arch/vax/vax/autoconf.c b/sys/arch/vax/vax/autoconf.c index f48d226c7d9..3b92f89460a 100644 --- a/sys/arch/vax/vax/autoconf.c +++ b/sys/arch/vax/vax/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.19 2002/09/17 02:37:20 hugh Exp $ */ +/* $OpenBSD: autoconf.c,v 1.20 2005/12/27 18:31:11 miod Exp $ */ /* $NetBSD: autoconf.c,v 1.45 1999/10/23 14:56:05 ragge Exp $ */ /* @@ -78,11 +78,6 @@ cpu_configure() panic("mainbus not configured"); setroot(); - /* - * Configure swap area and related system - * parameter based on device(s) used. - */ - swapconf(); cpu_dumpconf(); /* diff --git a/sys/arch/vax/vax/rootfil.c b/sys/arch/vax/vax/rootfil.c index 237d27346af..59d6afcf247 100644 --- a/sys/arch/vax/vax/rootfil.c +++ b/sys/arch/vax/vax/rootfil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rootfil.c,v 1.17 2004/12/25 23:02:26 miod Exp $ */ +/* $OpenBSD: rootfil.c,v 1.18 2005/12/27 18:31:11 miod Exp $ */ /* $NetBSD: rootfil.c,v 1.14 1996/10/13 03:35:58 christos Exp $ */ /* @@ -408,29 +408,3 @@ getstr(char *buf, int size) { cnpollc(0); return (len); } - -/* - * Configure swap space and related parameters. - */ -void -swapconf() -{ - struct swdevt *swp; - u_int maj; - int nblks; - - for (swp = swdevt; swp->sw_dev != NODEV; swp++) { - - maj = major(swp->sw_dev); - if (maj > nblkdev) /* paranoid? */ - break; - - if (bdevsw[maj].d_psize) { - nblks = (*bdevsw[maj].d_psize)(swp->sw_dev); - if (nblks > 0 && - (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) - swp->sw_nblks = nblks; - swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); - } - } -} diff --git a/sys/arch/zaurus/zaurus/autoconf.c b/sys/arch/zaurus/zaurus/autoconf.c index c38b72a5ee8..690d66f95f4 100644 --- a/sys/arch/zaurus/zaurus/autoconf.c +++ b/sys/arch/zaurus/zaurus/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.4 2005/11/25 02:42:25 brad Exp $ */ +/* $OpenBSD: autoconf.c,v 1.5 2005/12/27 18:31:11 miod Exp $ */ /* $NetBSD: autoconf.c,v 1.2 2001/09/05 16:17:36 matt Exp $ */ /* @@ -63,7 +63,6 @@ struct device *bootdv = NULL; int findblkmajor(struct device *dv); char * findblkname(int maj); -void swapconf(void); void rootconf(void); void diskconf(void); @@ -222,38 +221,10 @@ diskconf() #endif rootconf(); #if 0 - swapconf(); dumpconf(); #endif } -/* - * Configure swap space and related parameters. - */ -void -swapconf() -{ - register struct swdevt *swp; - register int nblks; - - for (swp = swdevt; swp->sw_dev != NODEV; swp++) { - int maj = major(swp->sw_dev); - - if (maj > nblkdev) - break; - if (bdevsw[maj].d_psize) { - nblks = (*bdevsw[maj].d_psize)(swp->sw_dev); - if (nblks != -1 && - (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) - swp->sw_nblks = nblks; - swp->sw_nblks = ctod(dtoc(swp->sw_nblks)); - } - } -} - -void rootconf(void); -void diskconf(void); - /* * void cpu_configure() |