summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2007-10-28 12:34:06 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2007-10-28 12:34:06 +0000
commitd36dd535bce8375048c6605b3a7a62d5ed8d1e30 (patch)
treec770823835346759d5ffa69193ee746ed9fd2cae /sys/arch
parent94bc612d4437e13ec77c9630fdd20410110002f3 (diff)
UltraSPARC CPUs don't have a floating-point queue, so cpu_reset_fpustate() is
redundant since there is no queue to flush.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc64/sparc64/cpu.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/sys/arch/sparc64/sparc64/cpu.c b/sys/arch/sparc64/sparc64/cpu.c
index 4449d56489e..f0bb472d1d0 100644
--- a/sys/arch/sparc64/sparc64/cpu.c
+++ b/sys/arch/sparc64/sparc64/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.27 2007/10/21 21:00:38 kettenis Exp $ */
+/* $OpenBSD: cpu.c,v 1.28 2007/10/28 12:34:05 kettenis Exp $ */
/* $NetBSD: cpu.c,v 1.13 2001/05/26 21:27:15 chs Exp $ */
/*
@@ -81,7 +81,6 @@ struct cpu_info *alloc_cpuinfo(int);
char machine[] = MACHINE; /* from <machine/param.h> */
char cpu_model[100];
-void cpu_reset_fpustate(void);
void cpu_hatch(void);
/* The CPU configuration driver. */
@@ -184,27 +183,6 @@ cpu_match(parent, vcf, aux)
return (strcmp(cf->cf_driver->cd_name, ma->ma_name) == 0);
}
-void
-cpu_reset_fpustate(void)
-{
- struct fpstate64 *fpstate;
- struct fpstate64 fps[2];
-
- /* This needs to be 64-bit aligned */
- fpstate = ALIGNFPSTATE(&fps[1]);
- /*
- * Get the FSR and clear any exceptions. If we do not unload
- * the queue here and it is left over from a previous crash, we
- * will panic in the first loadfpstate(), due to a sequence error,
- * so we need to dump the whole state anyway.
- *
- * If there is no FPU, trap.c will advance over all the stores,
- * so we initialize fs_fsr here.
- */
- fpstate->fs_fsr = 7 << FSR_VER_SHIFT; /* 7 is reserved for "none" */
- savefpstate(fpstate);
-}
-
/*
* Attach the CPU.
* Discover interesting goop about the virtual address cache
@@ -239,14 +217,6 @@ cpu_attach(parent, dev, aux)
*/
ci = alloc_cpuinfo(node);
- /*
- * Only do this on the boot cpu. Other cpu's call
- * cpu_reset_fpustate() from cpu_hatch() before they
- * call into the idle loop.
- */
- if (ci->ci_number == 0)
- cpu_reset_fpustate();
-
clk = getpropint(node, "clock-frequency", 0);
if (clk == 0) {
/*
@@ -417,7 +387,6 @@ cpu_hatch(void)
{
int s;
- cpu_reset_fpustate();
curcpu()->ci_flags |= CPUF_RUNNING;
sparc_membar(Sync);