Skip to contentSkip to conversation

CVS [email protected]: linux

DISCUSSION Atsushi Nemoto 3 participants 4 messages Sep 30, 2002 – Oct 1, 2002 1 message not in the archive MIPS

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

It seems some necessary codes for non-r4k CPUs were lost by this change.

Quoted 16 lines

CVSROOT: /home/cvs
Module name: linux
Changes by: [email protected] 02/09/29 03:49:20

Modified files:

	arch/mips/kernel: Tag: linux_2_4 traps.c 
	arch/mips/mm   : Tag: linux_2_4 c-sb1.c tlb-sb1.c 
	arch/mips64/kernel: Tag: linux_2_4 traps.c 
	arch/mips64/mm : Tag: linux_2_4 Makefile c-sb1.c loadmmu.c 
	                 tlb-r4k.c tlb-sb1.c tlbex-r4k.S 
Added files:
	arch/mips64/mm : Tag: linux_2_4 c-andes.c c-r4k.c pg-andes.c 
	                 pg-r4k.c tlb-andes.c 
Removed files:
	arch/mips64/mm : Tag: linux_2_4 andes.c r4xx0.c 
Quoted 2 lines

Log message:
Reorganize arch/mips64/mm along the line of it's 32-bit equivalent.

This is a patch to revert the change.

arch/mips/kernel/traps.c +24 -0
diff -ur linux-mips-cvs/arch/mips/kernel/traps.c linux.new/arch/mips/kernel/traps.c
@@ -1015,6 +1015,30 @@
 			memcpy((void *)(KSEG0 + 0x180), &except_vec3_r4000,
 			       0x80);
 		}
+	} else switch (mips_cpu.cputype) {
+	case CPU_SB1:
+		/*
+		 * XXX - This should be folded in to the "cleaner" handling,
+		 * above
+		 */
+		memcpy((void *)(KSEG0 + 0x180), &except_vec3_r4000, 0x80);
+		break;
+	case CPU_R6000:
+	case CPU_R6000A:
+	case CPU_R2000:
+	case CPU_R3000:
+	case CPU_R3000A:
+	case CPU_R3041:
+	case CPU_R3051:
+	case CPU_R3052:
+	case CPU_R3081:
+	case CPU_R3081E:
+	case CPU_TX3912:
+	case CPU_TX3922:
+	case CPU_TX3927:
+	case CPU_TX39XX:
+		memcpy((void *)(KSEG0 + 0x80), &except_vec3_generic, 0x80);
+		break;
 	}
 
 	if (mips_cpu.cputype == CPU_R6000 || mips_cpu.cputype == CPU_R6000A) {

---
Atsushi Nemoto

#2 lore raw
Quoted 1 line · Atsushi Nemoto

It seems some necessary codes for non-r4k CPUs were lost by this change.

Mercyfully sent to /dev/null you wanted to say.

arch/mips/kernel/traps.c line 1025

Quoted 7 lines
arch/mips/kernel/traps.c +7 -0
+	case CPU_SB1:
+		/*
+		 * XXX - This should be folded in to the "cleaner" handling,
+		 * above
+		 */
+		memcpy((void *)(KSEG0 + 0x180), &except_vec3_r4000, 0x80);
+		break;

This was a bug. Except_vec3_r4000 is only intended for the R4000/R4400, the only MIPS CPUs which support the virtual coherency exception. SB1 should use except_vec4_generic instead.

arch/mips/kernel/traps.c line 1040

Quoted 2 lines
arch/mips/kernel/traps.c +2 -0
+	case CPU_TX39XX:
+		memcpy((void *)(KSEG0 + 0x80), &except_vec3_generic, 0x80);

Eeek, will fix. Consider the switch gone however.

Ralf

#3 lore raw
In reply to Atsushi Nemoto

Suggestion for this bug: Since the except_vec3_r4000 is a fix for the 4k series only, add 'default' statement as below:

Quoted 42 lines · Atsushi Nemoto

It seems some necessary codes for non-r4k CPUs were lost by this change.

Quoted 16 lines

CVSROOT: /home/cvs
Module name: linux
Changes by: [email protected] 02/09/29 03:49:20

Modified files:

	arch/mips/kernel: Tag: linux_2_4 traps.c 
	arch/mips/mm   : Tag: linux_2_4 c-sb1.c tlb-sb1.c 
	arch/mips64/kernel: Tag: linux_2_4 traps.c 
	arch/mips64/mm : Tag: linux_2_4 Makefile c-sb1.c loadmmu.c 
	                 tlb-r4k.c tlb-sb1.c tlbex-r4k.S 
Added files:
	arch/mips64/mm : Tag: linux_2_4 c-andes.c c-r4k.c pg-andes.c 
	                 pg-r4k.c tlb-andes.c 
Removed files:
	arch/mips64/mm : Tag: linux_2_4 andes.c r4xx0.c 
Quoted 2 lines

Log message:
Reorganize arch/mips64/mm along the line of it's 32-bit equivalent.

This is a patch to revert the change.

diff -ur linux-mips-cvs/arch/mips/kernel/traps.c linux.new/arch/mips/kernel/traps.c

arch/mips/kernel/traps.c +12 -0
@@ -1015,6 +1015,30 @@
 			memcpy((void *)(KSEG0 + 0x180), &except_vec3_r4000,
 			       0x80);
 		}
+	} else switch (mips_cpu.cputype) {
+	case CPU_SB1:
+		/*
+		 * XXX - This should be folded in to the "cleaner" handling,
+		 * above
+		 */
+		memcpy((void *)(KSEG0 + 0x180), &except_vec3_r4000, 0x80);
+		break;
+	case CPU_R6000:
+	case CPU_R6000A:
+	case CPU_R2000:
+	case CPU_R3000:

arch/mips/kernel/traps.c line 1039

Quoted 10 lines
arch/mips/kernel/traps.c +10 -0
+	case CPU_R3000A:
+	case CPU_R3041:
+	case CPU_R3051:
+	case CPU_R3052:
+	case CPU_R3081:
+	case CPU_R3081E:
+	case CPU_TX3912:
+	case CPU_TX3922:
+	case CPU_TX3927:
+	case CPU_TX39XX:

+ default:

Quoted 9 lines
arch/mips/kernel/traps.c +2 -1
+		memcpy((void *)(KSEG0 + 0x80), &except_vec3_generic, 0x80);
+		break;
 	}
 
 	if (mips_cpu.cputype == CPU_R6000 || mips_cpu.cputype == CPU_R6000A) {
---

Atsushi Nemoto

Signature · 7 lines
Mike Nugent
Programmer/Author
[email protected]
"I believe the use of noise to make music will increase until we reach a
music produced through the aid of electrical instruments which will make
available for musical purposes any and all sounds that can be heard."
 -- composer John Cage, 1937
#4 lore raw
Quoted 2 lines · Mike Nugent

Suggestion for this bug: Since the except_vec3_r4000 is a fix for the 4k series only, add 'default' statement as below:

The whole switch statement there is ever inflating and covers only a tiny aspect of the CPU so I simply killed it.

Ralf