summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1997-11-11 10:43:58 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1997-11-11 10:43:58 +0000
commitb110c439f951610f9e8803270689ef551687e932 (patch)
tree13ba6108f09437a3331f4c134a38c7f3cf879f75 /sys
parent5ae6cac114fa58ff71d1236843854a3cef0a8578 (diff)
Remove thos evil statics, some KNF
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc/sparc/cpu.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/sys/arch/sparc/sparc/cpu.c b/sys/arch/sparc/sparc/cpu.c
index 7ffdabc862b..9fa13f0ae5e 100644
--- a/sys/arch/sparc/sparc/cpu.c
+++ b/sys/arch/sparc/sparc/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.9 1997/09/17 06:47:16 downsj Exp $ */
+/* $OpenBSD: cpu.c,v 1.10 1997/11/11 10:43:57 niklas Exp $ */
/* $NetBSD: cpu.c,v 1.56 1997/09/15 20:52:36 pk Exp $ */
/*
@@ -78,7 +78,7 @@ char machine_arch[] = MACHINE_ARCH; /* from <machine/param.h> */
char cpu_model[100];
/* The CPU configuration driver. */
-static void cpu_attach __P((struct device *, struct device *, void *));
+void cpu_attach __P((struct device *, struct device *, void *));
int cpu_match __P((struct device *, void *, void *));
struct cfattach cpu_ca = {
@@ -89,7 +89,7 @@ struct cfdriver cpu_cd = {
NULL, "cpu", DV_CPU
};
-static char *fsrtoname __P((int, int, int, char *));
+char *fsrtoname __P((int, int, int, char *));
void cache_print __P((struct cpu_softc *));
void cpu_spinup __P((struct cpu_softc *));
void fpu_init __P((struct cpu_softc *));
@@ -156,7 +156,7 @@ cpu_match(parent, vcf, aux)
* Discover interesting goop about the virtual address cache
* (slightly funny place to do it, but this is where it is to be found).
*/
-static void
+void
cpu_attach(parent, self, aux)
struct device *parent;
struct device *self;
@@ -200,13 +200,12 @@ cpu_attach(parent, self, aux)
fpu_init(sc);
if (foundfpu)
fpuname = fsrtoname(sc->cpu_impl, sc->cpu_vers,
- sc->fpuvers, fpbuf);
+ sc->fpuvers, fpbuf);
}
/* XXX - multi-processor: take care of `cpu_model' and `foundfpu' */
- sprintf(cpu_model, "%s @ %s MHz, %s FPU",
- sc->cpu_name,
- clockfreq(sc->hz), fpuname);
+ sprintf(cpu_model, "%s @ %s MHz, %s FPU", sc->cpu_name,
+ clockfreq(sc->hz), fpuname);
printf(": %s\n", cpu_model);
if (sc->cacheinfo.c_totalsize != 0)
@@ -267,7 +266,7 @@ fpu_init(sc)
fpstate.fs_fsr = 7 << FSR_VER_SHIFT;
savefpstate(&fpstate);
sc->fpuvers =
- (fpstate.fs_fsr >> FSR_VER_SHIFT) & (FSR_VER >> FSR_VER_SHIFT);
+ (fpstate.fs_fsr >> FSR_VER_SHIFT) & (FSR_VER >> FSR_VER_SHIFT);
if (sc->fpuvers != 7)
foundfpu = 1;
@@ -287,31 +286,30 @@ cache_print(sc)
printf("%s", (ci->c_physical ? " physical" : ""));
if (ci->ic_totalsize > 0) {
printf("%s%dK instruction (%d b/l)", sep,
- ci->ic_totalsize/1024, ci->ic_linesize);
+ ci->ic_totalsize/1024, ci->ic_linesize);
sep = ", ";
}
if (ci->dc_totalsize > 0) {
printf("%s%dK data (%d b/l)", sep,
- ci->dc_totalsize/1024, ci->dc_linesize);
+ ci->dc_totalsize/1024, ci->dc_linesize);
sep = ", ";
}
printf(" ");
} else if (ci->c_physical) {
/* combined, physical */
printf(" physical %dK combined cache (%d bytes/line) ",
- ci->c_totalsize/1024, ci->c_linesize);
+ ci->c_totalsize/1024, ci->c_linesize);
} else {
/* combined, virtual */
printf(" %dK byte write-%s, %d bytes/line, %cw flush ",
- ci->c_totalsize/1024,
- (ci->c_vactype == VAC_WRITETHROUGH) ? "through" : "back",
- ci->c_linesize,
- ci->c_hwflush ? 'h' : 's');
+ ci->c_totalsize/1024,
+ (ci->c_vactype == VAC_WRITETHROUGH) ? "through" : "back",
+ ci->c_linesize, ci->c_hwflush ? 'h' : 's');
}
if (ci->ec_totalsize > 0) {
printf(", %dK external (%d b/l)",
- ci->ec_totalsize/1024, ci->ec_linesize);
+ ci->ec_totalsize/1024, ci->ec_linesize);
}
}
@@ -1198,7 +1196,7 @@ static struct info fpu_types[] = {
{ 0 }
};
-static char *
+char *
fsrtoname(impl, vers, fver, buf)
register int impl, vers, fver;
char *buf;