summaryrefslogtreecommitdiffstats
path: root/sys/amd64/isa
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>2001-07-17 13:06:47 +0000
committertegge <tegge@FreeBSD.org>2001-07-17 13:06:47 +0000
commitf2e49729a0baf1d3bdd3bf9fab3b3737216e7a4a (patch)
tree9db33867adba13e31abb7a2baca5bddac8042a63 /sys/amd64/isa
parent1a2a5935ee2d66e788d658677b29a8428581d6f5 (diff)
downloadFreeBSD-src-f2e49729a0baf1d3bdd3bf9fab3b3737216e7a4a.zip
FreeBSD-src-f2e49729a0baf1d3bdd3bf9fab3b3737216e7a4a.tar.gz
The per-cpu temporary buffers are not needed since the pcb_save areas have
the proper alignment. Change dummy variable in npxinit from stack to bss to ensure proper alignment. Reviewed by: bde
Diffstat (limited to 'sys/amd64/isa')
-rw-r--r--sys/amd64/isa/npx.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/sys/amd64/isa/npx.c b/sys/amd64/isa/npx.c
index b073f6b..5e4847f 100644
--- a/sys/amd64/isa/npx.c
+++ b/sys/amd64/isa/npx.c
@@ -564,7 +564,7 @@ void
npxinit(control)
u_short control;
{
- union savefpu dummy;
+ static union savefpu dummy;
critical_t savecrit;
if (!npx_exists)
@@ -926,30 +926,21 @@ static void
fpusave(addr)
union savefpu *addr;
{
- static struct savexmm svxmm[MAXCPU];
- u_char oncpu = PCPU_GET(cpuid);
if (!cpu_fxsr)
fnsave(addr);
- else {
- fxsave(&svxmm[oncpu]);
- bcopy(&svxmm[oncpu], addr, sizeof(struct savexmm));
- }
+ else
+ fxsave(addr);
}
static void
fpurstor(addr)
union savefpu *addr;
{
- static struct savexmm svxmm[MAXCPU];
- u_char oncpu = PCPU_GET(cpuid);
-
if (!cpu_fxsr)
frstor(addr);
- else {
- bcopy(addr, &svxmm[oncpu], sizeof (struct savexmm));
- fxrstor(&svxmm[oncpu]);
- }
+ else
+ fxrstor(addr);
}
#ifdef I586_CPU_XXX
OpenPOWER on IntegriCloud