Make booted_device global (and booted_parition for consitency).

Eliminate it from header files and other extern definitions.
This commit is contained in:
matt 2000-06-01 00:49:49 +00:00
parent e4c35df1c9
commit c9aff328d9
22 changed files with 62 additions and 74 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.h,v 1.16 1998/05/14 00:01:30 thorpej Exp $ */
/* $NetBSD: autoconf.h,v 1.17 2000/06/01 00:49:49 matt Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@ -112,7 +112,6 @@ struct alpha_variation_table {
extern struct evcnt clock_intr_evcnt;
#endif
extern struct device *booted_device;
extern int booted_partition;
extern struct bootdev_data *bootdev_data;
extern struct bootinfo_kernel bootinfo;

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.73 2000/05/18 15:39:22 kleink Exp $ */
/* $NetBSD: autoconf.c,v 1.74 2000/06/01 00:49:51 matt Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -50,6 +50,8 @@ int mbmatch __P((struct device *, struct cfdata *, void *));
#include <sys/kernel.h>
u_long boot_partition;
struct device *booted_device;
int booted_partition;
/*
* called at boot time, configure all devices on system
@ -110,9 +112,6 @@ cpu_configure()
void
cpu_rootconf()
{
struct device *booted_device;
int booted_partition;
findroot(&booted_device, &booted_partition);
#ifdef DEBUG_KERNEL_START
printf("survived findroot()\n");

View File

@ -1,4 +1,4 @@
/* $NetBSD: powerpc.h,v 1.1 2000/05/25 22:12:01 is Exp $ */
/* $NetBSD: powerpc.h,v 1.2 2000/06/01 00:49:59 matt Exp $ */
/*
* Copyright (C) 1996 Wolfgang Solfrank.
@ -52,7 +52,6 @@ int dk_match __P((char *name));
void ofrootfound __P((void));
extern struct device *booted_device;
extern int booted_partition;
#endif /* _MACHINE_POWERPC_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.13 2000/01/23 21:01:50 soda Exp $ */
/* $NetBSD: autoconf.c,v 1.14 2000/06/01 00:49:52 matt Exp $ */
/* $OpenBSD: autoconf.c,v 1.9 1997/05/18 13:45:20 pefo Exp $ */
/*
@ -72,6 +72,9 @@ int getpno __P((char **cp));
* the machine.
*/
int cpuspeed = 150; /* approx # instr per usec. */
struct device *booted_device;
int booted_partition;
void findroot __P((struct device **, int *));
@ -97,9 +100,6 @@ int nfs_boot_rfc951 = 1;
void
cpu_rootconf()
{
struct device *booted_device;
int booted_partition;
findroot(&booted_device, &booted_partition);
printf("boot device: %s\n",

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.32 1999/09/17 19:59:38 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.33 2000/06/01 00:49:52 matt Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@ -70,8 +70,8 @@ extern void startrtclock __P((void));
#include "podulebus.h"
static struct device *booted_device;
static int booted_partition;
struct device *booted_device;
int booted_partition;
extern dev_t dumpdev;

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.31 1999/09/17 19:59:40 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.32 2000/06/01 00:49:53 matt Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@ -47,6 +47,9 @@ void mbattach __P((struct device *, struct device *, void *));
int mbprint __P((void *, const char *));
int mbmatch __P((struct device *, struct cfdata *, void *));
struct device *booted_device;
int booted_partition;
int atari_realconfig;
#include <sys/kernel.h>
@ -67,9 +70,6 @@ cpu_configure()
void
cpu_rootconf()
{
struct device *booted_device;
int booted_partition;
findroot(&booted_device, &booted_partition);
setroot(booted_device, booted_partition);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.5 1999/09/17 19:59:41 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.6 2000/06/01 00:49:53 matt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -58,6 +58,9 @@
#include <machine/pte.h>
#include <machine/intr.h>
struct device *booted_device;
int booted_partition;
void findroot __P((struct device **, int *));
/*
@ -81,9 +84,6 @@ cpu_configure()
void
cpu_rootconf()
{
struct device *booted_device;
int booted_partition;
findroot(&booted_device, &booted_partition);
printf("boot device: %s\n",

View File

@ -1,4 +1,4 @@
/* $NetBSD: powerpc.h,v 1.3 1998/08/24 01:40:29 sakamoto Exp $ */
/* $NetBSD: powerpc.h,v 1.4 2000/06/01 00:49:59 matt Exp $ */
/*
* Copyright (C) 1996 Wolfgang Solfrank.
@ -48,7 +48,6 @@ void mem_regions __P((struct mem_region **, struct mem_region **));
void ppc_exit __P((void)) __attribute__((__noreturn__));
void ppc_boot __P((char *bootspec)) __attribute__((__noreturn__));
extern struct device *booted_device;
extern int booted_partition;
#endif /* _MACHINE_POWERPC_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.2 2000/03/31 14:51:49 soren Exp $ */
/* $NetBSD: autoconf.c,v 1.3 2000/06/01 00:49:54 matt Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang. All rights reserved.
@ -33,6 +33,9 @@
#include <machine/cpu.h>
struct device *booted_device;
int booted_partition;
static void findroot(struct device **, int *);
int cpuspeed = 100; /* Until we know more precisely. */
@ -51,9 +54,6 @@ cpu_configure()
void
cpu_rootconf()
{
struct device *booted_device;
int booted_partition;
findroot(&booted_device, &booted_partition);
printf("boot device: %s\n",

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.5 2000/01/16 20:01:41 uch Exp $ */
/* $NetBSD: autoconf.c,v 1.6 2000/06/01 00:49:54 matt Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.5 2000/01/16 20:01:41 uch Exp $");
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.6 2000/06/01 00:49:54 matt Exp $");
/*
* Setup the system to run on the current machine.
@ -72,6 +72,9 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.5 2000/01/16 20:01:41 uch Exp $");
int cpuspeed = 7; /* approx # instr per usec. */
struct device *booted_device;
int booted_partition;
static char booted_device_name[16];
static void get_device __P((char *name, struct device **devpp, int *partp));
@ -103,9 +106,6 @@ cpu_configure()
void
cpu_rootconf()
{
struct device *booted_device;
int booted_partition;
get_device(booted_device_name, &booted_device, &booted_partition);
printf("boot device: %s\n",

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.47 2000/03/23 13:49:49 ad Exp $ */
/* $NetBSD: autoconf.c,v 1.48 2000/06/01 00:49:55 matt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -87,6 +87,9 @@ extern int i386_ndisks;
#include <i386/pci/pcibios.h>
#endif
struct device *booted_device;
int booted_partition;
/*
* Determine i/o configuration for a machine.
*/
@ -122,9 +125,6 @@ cpu_configure()
void
cpu_rootconf()
{
struct device *booted_device;
int booted_partition;
findroot(&booted_device, &booted_partition);
matchbiosdisks();
@ -261,7 +261,6 @@ matchbiosdisks()
#ifdef COMPAT_OLDBOOT
u_long bootdev = 0; /* should be dev_t, but not until 32 bits */
#endif
struct device *booted_device;
/*
* helper function for "findroot()":

View File

@ -1,4 +1,4 @@
/* $NetBSD: powerpc.h,v 1.2 1998/08/21 16:13:28 tsubai Exp $ */
/* $NetBSD: powerpc.h,v 1.3 2000/06/01 00:49:59 matt Exp $ */
/*
* Copyright (C) 1996 Wolfgang Solfrank.
@ -52,7 +52,6 @@ int dk_match __P((char *name));
void ofrootfound __P((void));
extern struct device *booted_device;
extern int booted_partition;
#endif /* _MACHINE_POWERPC_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.11 1999/12/22 05:55:26 tsubai Exp $ */
/* $NetBSD: autoconf.c,v 1.12 2000/06/01 00:49:56 matt Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -76,6 +76,9 @@
*/
int cpuspeed = 10; /* approx # instr per usec. */
struct device *booted_device;
int booted_partition;
void findroot __P((struct device **, int *));
/*
@ -117,9 +120,6 @@ cpu_configure()
void
cpu_rootconf()
{
struct device *booted_device;
int booted_partition;
findroot(&booted_device, &booted_partition);
printf("boot device: %s\n",

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_xe.c,v 1.3 1999/02/13 09:44:50 dbj Exp $ */
/* $NetBSD: if_xe.c,v 1.4 2000/06/01 00:49:51 matt Exp $ */
/*
* Copyright (c) 1998 Darrin B. Jewell
* All rights reserved.
@ -160,10 +160,7 @@ xe_attach(parent, self, aux)
isrlink_autovec(xe_rint, sc, NEXT_I_IPL(NEXT_I_ENETR), 1);
INTR_ENABLE(NEXT_I_ENETR);
{
extern struct device *booted_device;
booted_device = &(sc->sc_dev);
}
booted_device = &(sc->sc_dev);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: powerpc.h,v 1.3 1998/08/26 04:54:17 sakamoto Exp $ */
/* $NetBSD: powerpc.h,v 1.4 2000/06/01 00:50:00 matt Exp $ */
/*
* Copyright (C) 1996 Wolfgang Solfrank.
@ -52,7 +52,6 @@ int dk_match __P((char *name));
void ofrootfound __P((void));
extern struct device *booted_device;
extern int booted_partition;
#endif /* _MACHINE_POWERPC_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.h,v 1.3 1997/07/17 02:05:15 jtk Exp $ */
/* $NetBSD: autoconf.h,v 1.4 2000/06/01 00:49:50 matt Exp $ */
/*
* Copyright (c) 1994 Matthias Pfaller.
@ -46,4 +46,3 @@ struct confargs {
#define cf_irq cf_loc[MAINBUSCF_IRQ]
extern u_long bootdev;
extern struct device *booted_device;

View File

@ -1,4 +1,4 @@
/* $NetBSD: powerpc.h,v 1.1 2000/02/29 15:21:32 nonaka Exp $ */
/* $NetBSD: powerpc.h,v 1.2 2000/06/01 00:50:00 matt Exp $ */
/*
* Copyright (C) 1996 Wolfgang Solfrank.
@ -48,7 +48,6 @@ void mem_regions __P((struct mem_region **, struct mem_region **));
void ppc_exit __P((void)) __attribute__((__noreturn__));
void ppc_boot __P((char *bootspec)) __attribute__((__noreturn__));
extern struct device *booted_device;
extern int booted_partition;
#endif /* _MACHINE_POWERPC_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.1 2000/02/29 15:21:47 nonaka Exp $ */
/* $NetBSD: autoconf.c,v 1.2 2000/06/01 00:49:56 matt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -58,6 +58,9 @@
#include <machine/pte.h>
#include <machine/intr.h>
struct device *booted_device;
int booted_partition;
void findroot __P((struct device **, int *));
/*
@ -81,9 +84,6 @@ cpu_configure()
void
cpu_rootconf()
{
struct device *booted_device;
int booted_partition;
findroot(&booted_device, &booted_partition);
printf("boot device: %s\n",

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.4 1999/09/17 20:04:51 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.5 2000/06/01 00:49:57 matt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -64,6 +64,9 @@
static int match_harddisk __P((struct device *, struct btinfo_bootdisk *));
struct device *booted_device;
int booted_partition;
void findroot __P((struct device **, int *));
/*
@ -87,9 +90,6 @@ cpu_configure()
void
cpu_rootconf()
{
struct device *booted_device;
int booted_partition;
findroot(&booted_device, &booted_partition);
printf("boot device: %s\n",

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.57 2000/05/31 23:55:51 matt Exp $ */
/* $NetBSD: autoconf.c,v 1.58 2000/06/01 00:49:57 matt Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@ -64,8 +64,10 @@
void gencnslask __P((void));
struct cpu_dep *dep_call;
int mastercpu; /* chief of the system */
int mastercpu; /* chief of the system */
struct device *booted_device;
int booted_partition; /* defaults to 0 (aka 'a' partition */
#define MAINBUS 0
@ -87,8 +89,6 @@ cpu_configure()
void
cpu_rootconf()
{
int booted_partition = 0;
/*
* The device we booted from are looked for during autoconfig.
* If there has been a match, it's already been done.

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.22 1999/09/23 15:14:59 minoura Exp $ */
/* $NetBSD: autoconf.c,v 1.23 2000/06/01 00:49:58 matt Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@ -59,7 +59,11 @@ static int simple_devprint __P((void *, const char *));
static struct device *scsi_find __P((dev_t));
static struct device *find_dev_byname __P((const char *));
struct device *booted_device;
int booted_partition;
int x68k_realconfig;
#include <sys/kernel.h>
/*
@ -82,9 +86,6 @@ cpu_configure()
void
cpu_rootconf()
{
struct device *booted_device;
int booted_partition;
findroot(&booted_device, &booted_partition);
printf("boot device: %s\n",

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_netbsdkintf.c,v 1.88 2000/05/30 03:29:49 oster Exp $ */
/* $NetBSD: rf_netbsdkintf.c,v 1.89 2000/06/01 00:50:01 matt Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@ -295,7 +295,6 @@ static int raidautoconfig = 0; /* Debugging, mostly. Set to 0 to not
Note that this is overridden by having
RAID_AUTOCONFIG as an option in the
kernel config file. */
extern struct device *booted_device;
void
raidattach(num)