Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] TX49Lx support
@ 2003-11-26  6:07 Atsushi Nemoto
  2003-11-26 15:53 ` Ralf Baechle
  0 siblings, 1 reply; 3+ messages in thread
From: Atsushi Nemoto @ 2003-11-26  6:07 UTC (permalink / raw)
  To: ralf, linux-mips

Some TX49 do not have FPU.  We can tell such CPUs by bit3 of PrID.
Here is a patch for 2.4 tree.  The first hunk can also be used for 2.6
tree.  Please apply.  Thank you.

diff -ur linux-mips/arch/mips/kernel/cpu-probe.c linux/arch/mips/kernel/cpu-probe.c
--- linux-mips/arch/mips/kernel/cpu-probe.c	Tue Nov  4 16:57:34 2003
+++ linux/arch/mips/kernel/cpu-probe.c	Wed Nov 26 10:35:47 2003
@@ -297,6 +297,8 @@
 		c->isa_level = MIPS_CPU_ISA_III;
 		c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
 		             MIPS_CPU_LLSC;
+		if (c->processor_id & 0x08)	/* TX49Lx: no FPU */
+			c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR);
 		c->tlbsize = 48;
 		break;
 	case PRID_IMP_R5000:
diff -ur linux-mips/arch/mips64/kernel/cpu-probe.c linux/arch/mips64/kernel/cpu-probe.c
--- linux-mips/arch/mips64/kernel/cpu-probe.c	Tue Nov  4 16:57:37 2003
+++ linux/arch/mips64/kernel/cpu-probe.c	Wed Nov 26 10:35:50 2003
@@ -622,6 +622,8 @@
 			c->isa_level = MIPS_CPU_ISA_III;
 			c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
 			             MIPS_CPU_LLSC;
+			if (c->processor_id & 0x08)	/* TX49Lx: no FPU */
+				c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR);
 			c->tlbsize = 48;
 			break;
 		case PRID_IMP_R5000:
---
Atsushi Nemoto

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

end of thread, other threads:[~2003-11-27  1:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-26  6:07 [PATCH] TX49Lx support Atsushi Nemoto
2003-11-26 15:53 ` Ralf Baechle
2003-11-27  1:13   ` Atsushi Nemoto

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