[PATCH] x86-32, fpu: unbreak FPU exceptions on systems without SSE

From: Hans Rosenfeld
Date: Tue Apr 05 2011 - 13:26:56 EST


On 32bit systems without SSE, FPU exceptions in user mode cause Oopses,
BUGs, recursive faults and other nasty things.

This was caused by commit 58a992b9cbaf449aeebd3575c3695a9eb5d95b5e:
x86-32, fpu: Rewrite fpu_save_init()
---
arch/x86/include/asm/i387.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/include/asm/i387.h b/arch/x86/include/asm/i387.h
index ef32890..c9e09ea 100644
--- a/arch/x86/include/asm/i387.h
+++ b/arch/x86/include/asm/i387.h
@@ -237,7 +237,7 @@ static inline void fpu_save_init(struct fpu *fpu)
} else if (use_fxsr()) {
fpu_fxsave(fpu);
} else {
- asm volatile("fsave %[fx]; fwait"
+ asm volatile("fnsave %[fx]; fwait"
: [fx] "=m" (fpu->state->fsave));
return;
}
--
1.5.6.5


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/