From: Randy Dunlap <rdunlap@xenotime.net>
To: Linus Torvalds <torvalds@osdl.org>
Cc: akpm <akpm@osdl.org>, Jesper Juhl <jesper.juhl@gmail.com>,
Andi Kleen <ak@suse.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH/RFC] Math-emu kills the kernel on Athlon64 X2
Date: Mon, 2 Oct 2006 21:38:09 -0700 [thread overview]
Message-ID: <20061002213809.7a3f995f.rdunlap@xenotime.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0610021932080.3952@g5.osdl.org>
OK, how about something more direct and less obtrusive, like this?
---
From: Randy Dunlap <rdunlap@xenotime.net>
Honor "nofxsr" boot option during init.
Eliminates the math fault during boot.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
arch/i386/kernel/cpu/common.c | 2 +-
arch/i386/kernel/i387.c | 2 +-
include/asm-i386/i387.h | 2 ++
3 files changed, 4 insertions(+), 2 deletions(-)
--- linux-2618-g18.orig/arch/i386/kernel/cpu/common.c
+++ linux-2618-g18/arch/i386/kernel/cpu/common.c
@@ -28,7 +28,7 @@ DEFINE_PER_CPU(unsigned char, cpu_16bit_
EXPORT_PER_CPU_SYMBOL(cpu_16bit_stack);
static int cachesize_override __cpuinitdata = -1;
-static int disable_x86_fxsr __cpuinitdata;
+int disable_x86_fxsr __cpuinitdata;
static int disable_x86_serial_nr __cpuinitdata = 1;
static int disable_x86_sep __cpuinitdata;
--- linux-2618-g18.orig/arch/i386/kernel/i387.c
+++ linux-2618-g18/arch/i386/kernel/i387.c
@@ -30,7 +30,7 @@ void mxcsr_feature_mask_init(void)
{
unsigned long mask = 0;
clts();
- if (cpu_has_fxsr) {
+ if (cpu_has_fxsr && !disable_x86_fxsr) {
memset(¤t->thread.i387.fxsave, 0, sizeof(struct i387_fxsave_struct));
asm volatile("fxsave %0" : : "m" (current->thread.i387.fxsave));
mask = current->thread.i387.fxsave.mxcsr_mask;
--- linux-2618-g18.orig/include/asm-i386/i387.h
+++ linux-2618-g18/include/asm-i386/i387.h
@@ -18,6 +18,8 @@
#include <asm/sigcontext.h>
#include <asm/user.h>
+extern int disable_x86_fxsr;
+
extern void mxcsr_feature_mask_init(void);
extern void init_fpu(struct task_struct *);
next prev parent reply other threads:[~2006-10-03 4:36 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-18 22:18 Jesper Juhl
2006-09-18 22:52 ` Linus Torvalds
2006-09-18 23:14 ` Jesper Juhl
2006-09-18 23:49 ` Linus Torvalds
2006-09-19 0:47 ` Jesper Juhl
2006-09-19 2:18 ` Linus Torvalds
2006-09-18 23:49 ` Sergio Monteiro Basto
2006-09-19 0:02 ` Jesper Juhl
2006-09-19 12:28 ` Krzysztof Halasa
2006-09-20 0:48 ` Sergio Monteiro Basto
2006-09-20 22:31 ` Krzysztof Halasa
2006-09-19 8:01 ` Andi Kleen
2006-09-19 8:31 ` Jesper Juhl
2006-09-19 21:14 ` Jesper Juhl
2006-09-19 22:01 ` Linus Torvalds
2006-09-19 22:16 ` Jesper Juhl
2006-09-19 22:44 ` Jesper Juhl
2006-10-03 2:16 ` [PATCH/RFC] " Randy Dunlap
2006-10-03 2:34 ` Linus Torvalds
2006-10-03 3:24 ` Randy Dunlap
2006-10-03 10:05 ` Andi Kleen
2006-10-03 14:54 ` Linus Torvalds
2006-10-03 10:11 ` [PATCH/RFC] Math-emu kills the kernel on Athlon64 X2 II -- it's terminally broken Andi Kleen
2006-10-03 11:53 ` Alan Cox
2006-10-03 14:48 ` Linus Torvalds
2006-10-03 4:38 ` Randy Dunlap [this message]
2006-10-03 11:30 ` [PATCH/RFC] Math-emu kills the kernel on Athlon64 X2 Alan Cox
2006-10-03 15:10 ` Linus Torvalds
2006-10-03 16:23 ` Randy Dunlap
2006-10-03 16:37 ` Linus Torvalds
2006-10-03 16:49 ` Randy Dunlap
2006-10-03 16:51 ` Linus Torvalds
2006-10-04 19:24 ` Jesper Juhl
2006-10-04 19:43 ` Linus Torvalds
2006-10-04 20:02 ` Jesper Juhl
2006-10-04 22:00 ` Alan Cox
2006-10-04 21:44 ` Andi Kleen
2006-09-20 8:16 ` Andi Kleen
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=20061002213809.7a3f995f.rdunlap@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=jesper.juhl@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®