diff options
author | Dimitry Andric <dim@cvs.openbsd.org> | 2006-11-29 20:03:21 +0000 |
---|---|---|
committer | Dimitry Andric <dim@cvs.openbsd.org> | 2006-11-29 20:03:21 +0000 |
commit | be1eefc2baf28ab9484ecd9842c6cf7dbd312624 (patch) | |
tree | 2e134ae31b3566589c51477924476aa22212a4f1 /sys | |
parent | 3a311ba77e608a63dedd111b3163d6955ecdc9ca (diff) |
Remove all the extern cpu_{id,model,whatever} declarations from most
stuff in arch/i386/i386. This should prevent more screwups like the
one I did before in ichpcib.c...
ok dlg@ kettenis@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 16 | ||||
-rw-r--r-- | sys/arch/i386/i386/mainbus.c | 3 | ||||
-rw-r--r-- | sys/arch/i386/i386/mpbios.c | 3 | ||||
-rw-r--r-- | sys/arch/i386/i386/mtrr.c | 7 | ||||
-rw-r--r-- | sys/arch/i386/i386/pctr.c | 7 | ||||
-rw-r--r-- | sys/arch/i386/i386/procfs_machdep.c | 6 | ||||
-rw-r--r-- | sys/arch/i386/include/cpu.h | 19 | ||||
-rw-r--r-- | sys/arch/i386/include/param.h | 4 | ||||
-rw-r--r-- | sys/arch/i386/pci/ichpcib.c | 3 |
9 files changed, 24 insertions, 44 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 04ebe3146f1..0a2081e9231 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.370 2006/11/28 18:35:19 dim Exp $ */ +/* $OpenBSD: machdep.c,v 1.371 2006/11/29 20:03:19 dim Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -404,7 +404,6 @@ cpu_startup() int sz; vaddr_t minaddr, maxaddr, va; paddr_t pa; - extern int cpu_id; /* * Initialize error message buffer (at end of core). @@ -1565,7 +1564,6 @@ tm86_cpu_setup(struct cpu_info *ci) char * intel686_cpu_name(int model) { - extern int cpu_cache_edx; char *ret = NULL; switch (model) { @@ -1636,13 +1634,6 @@ cyrix3_cpu_name(int model, int step) void identifycpu(struct cpu_info *ci) { - extern char cpu_vendor[]; - extern char cpu_brandstr[]; -#ifdef CPUDEBUG - extern int cpu_cache_eax, cpu_cache_ebx, cpu_cache_ecx, cpu_cache_edx; -#else - extern int cpu_cache_edx; -#endif const char *name, *modifier, *vendorname, *token; int class = CPUCLASS_386, vendor, i, max; int family, model, step, modif, cachesize; @@ -3341,11 +3332,6 @@ int cpu_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, size_t newlen, struct proc *p) { - extern char cpu_vendor[]; - extern int cpu_id; -#if NAPM > 0 - extern int cpu_apmwarn; -#endif dev_t dev; switch (name[0]) { diff --git a/sys/arch/i386/i386/mainbus.c b/sys/arch/i386/i386/mainbus.c index a0c1b4ce648..f9bda59957d 100644 --- a/sys/arch/i386/i386/mainbus.c +++ b/sys/arch/i386/i386/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.29 2006/11/28 15:24:08 dim Exp $ */ +/* $OpenBSD: mainbus.c,v 1.30 2006/11/29 20:03:19 dim Exp $ */ /* $NetBSD: mainbus.c,v 1.21 1997/06/06 23:14:20 thorpej Exp $ */ /* @@ -146,7 +146,6 @@ mainbus_attach(struct device *parent, struct device *self, void *aux) int acpi_attached = 0; #endif extern void (*setperf_setup)(struct cpu_info *); - extern int cpu_id, cpu_feature; printf("\n"); diff --git a/sys/arch/i386/i386/mpbios.c b/sys/arch/i386/i386/mpbios.c index 8e12677e5a6..a45df54ee29 100644 --- a/sys/arch/i386/i386/mpbios.c +++ b/sys/arch/i386/i386/mpbios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpbios.c,v 1.18 2006/11/11 21:47:52 kettenis Exp $ */ +/* $OpenBSD: mpbios.c,v 1.19 2006/11/29 20:03:19 dim Exp $ */ /* $NetBSD: mpbios.c,v 1.2 2002/10/01 12:56:57 fvdl Exp $ */ /*- @@ -746,7 +746,6 @@ mpbios_cpu(const u_int8_t *ent, struct device *self) * we're running on */ if ((caa.cpu_signature & 0x00000fff) == 0) { - extern int cpu_id, cpu_feature; caa.cpu_signature = cpu_id; caa.feature_flags = cpu_feature; } diff --git a/sys/arch/i386/i386/mtrr.c b/sys/arch/i386/i386/mtrr.c index 029fcabd04a..8c9835494b0 100644 --- a/sys/arch/i386/i386/mtrr.c +++ b/sys/arch/i386/i386/mtrr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mtrr.c,v 1.8 2006/09/19 11:06:33 jsg Exp $ */ +/* $OpenBSD: mtrr.c,v 1.9 2006/11/29 20:03:20 dim Exp $ */ /*- * Copyright (c) 1999 Michael Smith <msmith@freebsd.org> * Copyright (c) 1999 Brian Fundakowski Feldman @@ -33,11 +33,6 @@ #include <machine/specialreg.h> -/* Pull in the cpuid values from locore.s */ -extern int cpu_id; -extern int cpu_feature; -extern char cpu_vendor[]; - extern struct mem_range_ops i686_mrops; extern struct mem_range_ops k6_mrops; diff --git a/sys/arch/i386/i386/pctr.c b/sys/arch/i386/i386/pctr.c index 2913a91a142..bc04c0cc5c8 100644 --- a/sys/arch/i386/i386/pctr.c +++ b/sys/arch/i386/i386/pctr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pctr.c,v 1.21 2006/09/19 11:06:33 jsg Exp $ */ +/* $OpenBSD: pctr.c,v 1.22 2006/11/29 20:03:20 dim Exp $ */ /* * Pentium performance counter driver for OpenBSD. @@ -24,11 +24,6 @@ pctrval pctr_idlcnt; /* Gets incremented in locore.s */ -/* Pull in the cpuid values from locore.s */ -extern int cpu_id; -extern int cpu_feature; -extern char cpu_vendor[]; - int pctr_isintel; #define usetsc (cpu_feature & CPUID_TSC) diff --git a/sys/arch/i386/i386/procfs_machdep.c b/sys/arch/i386/i386/procfs_machdep.c index 86b3142921d..3316e6a0ae9 100644 --- a/sys/arch/i386/i386/procfs_machdep.c +++ b/sys/arch/i386/i386/procfs_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procfs_machdep.c,v 1.4 2005/04/27 13:18:21 fgsch Exp $ */ +/* $OpenBSD: procfs_machdep.c,v 1.5 2006/11/29 20:03:20 dim Exp $ */ /* $NetBSD: procfs_machdep.c,v 1.6 2001/02/21 21:39:59 jdolecek Exp $ */ /* @@ -47,10 +47,6 @@ #include <machine/specialreg.h> extern int i386_fpu_present, i386_fpu_exception, i386_fpu_fdivbug; -extern int cpu_feature; -extern char cpu_model[]; -extern char cpu_vendor[]; -extern int cpu_id, cpu_class; static const char * const i386_features[] = { "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h index e1954531041..a437cd29c6b 100644 --- a/sys/arch/i386/include/cpu.h +++ b/sys/arch/i386/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.82 2006/11/29 12:26:13 miod Exp $ */ +/* $OpenBSD: cpu.h,v 1.83 2006/11/29 20:03:20 dim Exp $ */ /* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */ /*- @@ -288,16 +288,27 @@ struct cpu_cpuid_feature { }; #ifdef _KERNEL +/* locore.s */ extern int cpu; -extern int cpu_class; +extern int cpu_id; +extern char cpu_vendor[]; /* note: NOT nul-terminated */ +extern char cpu_brandstr[]; +extern int cpuid_level; extern int cpu_miscinfo; extern int cpu_feature; extern int cpu_ecxfeature; -extern int cpu_apmwarn; +extern int cpu_cache_eax; +extern int cpu_cache_ebx; +extern int cpu_cache_ecx; +extern int cpu_cache_edx; +/* machdep.c */ extern int cpu_apmhalt; -extern int cpuid_level; +extern int cpu_class; +extern char cpu_model[]; extern const struct cpu_nocpuid_nameclass i386_nocpuid_cpus[]; extern const struct cpu_cpuid_nameclass i386_cpuid_cpus[]; +/* apm.c */ +extern int cpu_apmwarn; #if defined(I586_CPU) || defined(I686_CPU) extern int pentium_mhz; diff --git a/sys/arch/i386/include/param.h b/sys/arch/i386/include/param.h index 433644f782e..86defa3f2c4 100644 --- a/sys/arch/i386/include/param.h +++ b/sys/arch/i386/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.36 2006/04/27 15:37:53 mickey Exp $ */ +/* $OpenBSD: param.h,v 1.37 2006/11/29 20:03:20 dim Exp $ */ /* $NetBSD: param.h,v 1.29 1996/03/04 05:04:26 cgd Exp $ */ /*- @@ -95,7 +95,7 @@ #define USPACE_ALIGN (0) /* u-area alignment 0-none */ #ifndef MSGBUFSIZE -#define MSGBUFSIZE 4*NBPG /* default message buffer size */ +#define MSGBUFSIZE 64*NBPG /* default message buffer size */ #endif /* diff --git a/sys/arch/i386/pci/ichpcib.c b/sys/arch/i386/pci/ichpcib.c index 99f4561528c..3a5ad83e790 100644 --- a/sys/arch/i386/pci/ichpcib.c +++ b/sys/arch/i386/pci/ichpcib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ichpcib.c,v 1.14 2006/11/29 16:03:00 dim Exp $ */ +/* $OpenBSD: ichpcib.c,v 1.15 2006/11/29 20:03:20 dim Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org> * @@ -81,7 +81,6 @@ struct cfdriver ichpcib_cd = { }; #ifndef SMALL_KERNEL -extern char cpu_model[]; static const char p4hint[] = "Mobile Intel(R) Pentium(R) 4"; static void *ichss_cookie; /* XXX */ extern int setperf_prio; |