Linux MIPS Architecture development
 help / color / mirror / Atom feed
* NON FPU cpus - way to go
@ 2001-02-07 13:48 Florian Lohoff
  2001-02-07 16:36 ` Maciej W. Rozycki
                   ` (2 more replies)
  0 siblings, 3 replies; 30+ messages in thread
From: Florian Lohoff @ 2001-02-07 13:48 UTC (permalink / raw)
  To: linux-mips; +Cc: ralf

Hi,
i would like to know the way to go for NON-FPU cpus - Currently its
partly an Compile Time thing and partly run time config. 

I stumbled over the current tree as on the 3912 we dont have a FPU
so we cant use the default "exit_thread" which simply causes the
CPU to halt (not even an cpu reset works)

arch/mips/process.c

     55 void exit_thread(void)
     56 {
     57         /* Forget lazy fpu state */
     58         if (last_task_used_math == current) {
     59                 set_cp0_status(ST0_CU1, ST0_CU1);
     60                 __asm__ __volatile__("cfc1\t$0,$31");
     61                 last_task_used_math = NULL;
     62         }
     63 }

The Linux-vr people IFDEFed this with CONFIG_NO_FPU which is an option
but then we could even remove the whole cpu probing as everything
would be compile time.

A question here - Which way to go - Compile or Run time config for
CPUs and is 

if(!(mips_cpu.options & MIPS_CPU_FPU))

this also valid for R3k CPU cores ? From my reading it is not as it doesnt
get initialized for R3000 ? As a lot architectures have the R3010
so this should get detected. The R3081 definitly has an FPU from
what i found on the web so this should be correct.

Index: arch/mips/kernel/setup.c
===================================================================
RCS file: /cvs/linux/arch/mips/kernel/setup.c,v
retrieving revision 1.49
diff -u -r1.49 setup.c
--- arch/mips/kernel/setup.c	2001/02/05 01:33:01	1.49
+++ arch/mips/kernel/setup.c	2001/02/07 13:39:16
@@ -182,15 +182,16 @@
 		mips_cpu.tlbsize = 64;
 		break;
 	case PRID_IMP_R3000:
+		mips_cpu.options = MIPS_CPU_TLB;
 		if ((mips_cpu.processor_id & 0xff) == PRID_REV_R3000A)
-			if (cpu_has_confreg())
+			if (cpu_has_confreg()) {
 				mips_cpu.cputype = CPU_R3081E;
-			else
+				mips_cpu.options |= MIPS_CPU_FPU;
+			} else
 				mips_cpu.cputype = CPU_R3000A;
 		else
 			 mips_cpu.cputype = CPU_R3000;
 		mips_cpu.isa_level = MIPS_CPU_ISA_I;
-		mips_cpu.options = MIPS_CPU_TLB;
 		mips_cpu.tlbsize = 64;
 		break;
 	case PRID_IMP_R4000:


Flo
-- 
Florian Lohoff                  flo@rfc822.org             +49-5201-669912
     Why is it called "common sense" when nobody seems to have any?

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2001-09-20  3:58 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-07 13:48 NON FPU cpus - way to go Florian Lohoff
2001-02-07 16:36 ` Maciej W. Rozycki
2001-02-07 16:59   ` Florian Lohoff
2001-02-07 18:19     ` Maciej W. Rozycki
2001-02-07 18:53   ` Alan Cox
2001-02-07 18:53     ` Alan Cox
2001-02-07 19:37     ` Jun Sun
2001-02-07 20:43       ` Joe deBlaquiere
2001-02-08  8:45         ` Geert Uytterhoeven
2001-02-08 10:13       ` Maciej W. Rozycki
2001-02-08 10:52         ` Kevin D. Kissell
2001-02-08 10:52           ` Kevin D. Kissell
2001-02-08 11:19           ` Maciej W. Rozycki
2001-02-08 11:38             ` Kevin D. Kissell
2001-02-08 11:38               ` Kevin D. Kissell
2001-02-08 12:05               ` Maciej W. Rozycki
2001-02-08 10:42     ` Maciej W. Rozycki
2001-02-08 10:53       ` Geert Uytterhoeven
2001-02-08 10:58         ` Alan Cox
2001-02-08 10:58           ` Alan Cox
2001-02-08 11:05           ` Geert Uytterhoeven
2001-02-08 11:22         ` Maciej W. Rozycki
2001-02-07 19:01 ` Jun Sun
2001-02-07 22:51   ` Kevin D. Kissell
2001-02-07 22:51     ` Kevin D. Kissell
2001-02-08 10:54     ` Maciej W. Rozycki
2001-02-08 10:24   ` Maciej W. Rozycki
2001-09-20  3:13 ` NON FPU cpus (again) Atsushi Nemoto
2001-09-20  3:16   ` Ralf Baechle
2001-09-20  4:02     ` Atsushi Nemoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox