summaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/traps.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-08-24 07:02:04 +0200
committerJeff Garzik <jgarzik@pobox.com>2005-08-24 07:02:04 +0200
commitb2382b363df828f25e35ed8b70a3da33b29b2a64 (patch)
tree23aa2e70ba4650390c9281b3696172313bdb0f38 /arch/i386/kernel/traps.c
parentieee80211: remove last uses of compat define WLAN_CAPABILITY_BSS (diff)
parentLinux v2.6.13-rc7 (diff)
downloadlinux-b2382b363df828f25e35ed8b70a3da33b29b2a64.tar.xz
linux-b2382b363df828f25e35ed8b70a3da33b29b2a64.zip
Merge upstream into ieee80211.
Hand-fix merge conflict in drivers/usb/net/zd1201.c.
Diffstat (limited to 'arch/i386/kernel/traps.c')
-rw-r--r--arch/i386/kernel/traps.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index a61f33d06ea3..cd2d5d5514fe 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -803,15 +803,17 @@ void math_error(void __user *eip)
*/
cwd = get_fpu_cwd(task);
swd = get_fpu_swd(task);
- switch (((~cwd) & swd & 0x3f) | (swd & 0x240)) {
+ switch (swd & ~cwd & 0x3f) {
case 0x000:
default:
break;
case 0x001: /* Invalid Op */
- case 0x041: /* Stack Fault */
- case 0x241: /* Stack Fault | Direction */
+ /*
+ * swd & 0x240 == 0x040: Stack Underflow
+ * swd & 0x240 == 0x240: Stack Overflow
+ * User must clear the SF bit (0x40) if set
+ */
info.si_code = FPE_FLTINV;
- /* Should we clear the SF or let user space do it ???? */
break;
case 0x002: /* Denormalize */
case 0x010: /* Underflow */