All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Charles Coffing" <ccoffing@novell.com>
To: xen-devel@lists.sourceforge.net
Subject: [PATCH]  FPU stack fault handling
Date: Thu, 05 Aug 2004 14:55:51 -0600	[thread overview]
Message-ID: <s1124a83.059@sinclair.provo.novell.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 464 bytes --]

The sparse Linux trees have diverged from mainstream Linux in their
handling of FPU errors.  I think mainstream Linux is correct.

According to the Pentium developer's manual in section 7.1.9, a stack
fault is a type of invalid operation.  So stack faults will have the
invalid op bit set.  The attached patch restores this behavior.


(Something mangled my previous inline patch, so I'm attaching this one
instead.  Let's see if this one survives...)

--Charles


[-- Attachment #2: fpu.patch --]
[-- Type: application/octet-stream, Size: 1075 bytes --]

--- xeno-unstable/linux-2.6.7-xen-sparse/arch/xen/i386/kernel/traps.c	2004-08-04 20:56:53.000000000 -0600
+++ xeno-unstable.fpu/linux-2.6.7-xen-sparse/arch/xen/i386/kernel/traps.c	2004-08-05 14:24:35.000000000 -0600
@@ -722,8 +722,8 @@
 		default:
 			break;
 		case 0x001: /* Invalid Op */
-		case 0x040: /* Stack Fault XXX? */
-		case 0x240: /* Stack Fault | Direction XXX? */
+		case 0x041: /* Stack Fault */
+		case 0x241: /* Stack Fault | Direction */
 			info.si_code = FPE_FLTINV;
 			/* Should we clear the SF or let user space do it ???? */
 			break;
--- xeno-unstable/linux-2.4.26-xen-sparse/arch/xen/kernel/traps.c	2004-08-04 20:56:51.000000000 -0600
+++ xeno-unstable.fpu/linux-2.4.26-xen-sparse/arch/xen/kernel/traps.c	2004-08-05 14:23:54.000000000 -0600
@@ -449,8 +449,8 @@
 		default:
 			break;
 		case 0x001: /* Invalid Op */
-		case 0x040: /* Stack Fault */
-		case 0x240: /* Stack Fault | Direction */
+		case 0x041: /* Stack Fault */
+		case 0x241: /* Stack Fault | Direction */
 			info.si_code = FPE_FLTINV;
 			break;
 		case 0x002: /* Denormalize */

                 reply	other threads:[~2004-08-05 20:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s1124a83.059@sinclair.provo.novell.com \
    --to=ccoffing@novell.com \
    --cc=xen-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.