linux-mips
[Top] [All Lists]

Re: Toshiba TX3927 board boot problem.

To: ralf@oss.sgi.com
Subject: Re: Toshiba TX3927 board boot problem.
From: Atsushi Nemoto <nemoto@toshiba-tops.co.jp>
Date: Mon, 29 Oct 2001 16:02:25 +0900 (JST)
Cc: ajob4me@21cn.com, linux-mips@oss.sgi.com
In-reply-to: <20011026.225806.63990588.nemoto@toshiba-tops.co.jp>
Organization: TOSHIBA Personal Computer System Corporation
References: <20011026095319.1C4BBB474@topsms.toshiba-tops.co.jp> <20011026.225806.63990588.nemoto@toshiba-tops.co.jp>
Sender: owner-linux-mips@oss.sgi.com
>>>>> On Fri, 26 Oct 2001 22:58:06 +0900 (JST), Atsushi Nemoto 
>>>>> <nemoto@toshiba-tops.co.jp> said:
nemoto> I have seen TX39 dead on "cfc1" insturuction if STATUS.CU1 bit
nemoto> enabled.  Such codes were in arch/mips/kernel/process.c.

So, please apply this patch to CVS for TX39XX support.

I use CONFIG_CPU_TX39XX in this patch, but I suppose other FPU-less
CPUs may need this also.

Does anybody know how about on other CPUs?

diff -u linux-sgi-cvs/arch/mips/kernel/process.c linux.new/arch/mips/kernel/
--- linux-sgi-cvs/arch/mips/kernel/process.c    Mon Oct 22 10:29:56 2001
+++ linux.new/arch/mips/kernel/process.c        Mon Oct 29 15:49:37 2001
@@ -57,6 +57,12 @@
 {
        /* Forget lazy fpu state */
        if (last_task_used_math == current) {
+#ifdef CONFIG_CPU_TX39XX
+               if (!(mips_cpu.options & MIPS_CPU_FPU)) {
+                       last_task_used_math = NULL;
+                       return;
+               }
+#endif
                set_cp0_status(ST0_CU1);
                __asm__ __volatile__("cfc1\t$0,$31");
                last_task_used_math = NULL;
@@ -67,6 +73,12 @@
 {
        /* Forget lazy fpu state */
        if (last_task_used_math == current) {
+#ifdef CONFIG_CPU_TX39XX
+               if (!(mips_cpu.options & MIPS_CPU_FPU)) {
+                       last_task_used_math = NULL;
+                       return;
+               }
+#endif
                set_cp0_status(ST0_CU1);
                __asm__ __volatile__("cfc1\t$0,$31");
                last_task_used_math = NULL;
---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>