Subject: segfaults with 2.4.8

From: George Gensure <[email-masked]>
Date: Sat, 01 Sep 2001 12:11:10 -0400

I'm running an r5000 indy with the latest (as of 8/31/01) cvs kernel and 
the fast-sysmips patch, and I'm having segfaults and strange errors in 
building tools like gcc and in building X.  The sysmips is correcting 
things like find, but I can't have these other errors (meant for lab 
machines).  Any takers?

George
[email-masked]

---

From: Florian Lohoff <[email-masked]>
Date: Sun, 2 Sep 2001 20:28:10 +0200

> things like find, but I can't have these other errors (meant for lab 

That is definitly a cache issue - The 2nd level Boardcache of
the R5000 indy is still unfixed.

Flo
-- 
Florian Lohoff                  [email-masked]             +49-5201-669912
     Why is it called "common sense" when nobody seems to have any?

---

From: Guido Guenther <[email-masked]>
Date: Mon, 3 Sep 2001 10:01:56 +0200

> > things like find, but I can't have these other errors (meant for lab 
Which toolchain did you use?
> the R5000 indy is still unfixed.
Not 100% sure about that. 2.4.5 handles this stuff fine while 2.4.8
segfaults(it might be that we just trigger this caching issues
occasionaly though). I will run this stuff on an R4k and see what
happens ... at least it's good to see that other people see this too - I
tended to blame it on my binutils experiments. Can you explain the
R5k Indys' caching issues?
 -- Guido

---

From: Atsushi Nemoto <[email-masked]>
Date: Mon, 03 Sep 2001 17:35:50 +0900 (JST)

>>>>> On Mon, 3 Sep 2001 10:01:56 +0200, Guido Guenther <[email-masked]> said:
flo> That is definitly a cache issue - The 2nd level Boardcache of the
flo> R5000 indy is still unfixed.
guenther> Not 100% sure about that. 2.4.5 handles this stuff fine
guenther> while 2.4.8 segfaults(it might be that we just trigger this
guenther> caching issues occasionaly though).

This might be the problem of recent entry.S I reported on 8/31.

I saw a strange SEGFAULT too and a following patch fixed the problem
(at least for me).

diff -ur linux.sgi/arch/mips/kernel/entry.S linux/arch/mips/kernel/entry.S
--- linux.sgi/arch/mips/kernel/entry.S	Sun Aug 26 22:32:47 2001
+++ linux/arch/mips/kernel/entry.S	Mon Sep  3 17:15:51 2001
@@ -44,17 +44,15 @@
 tracesys_exit:	jal	syscall_trace
 		b	ret_from_sys_call
 
-EXPORT(ret_from_irq)
-EXPORT(ret_from_exception)
-		lw	t0, PT_STATUS(sp)	# returning to kernel mode?
-		andi	t0, t0, KU_USER
-		bnez	t0, ret_from_sys_call
-		j	restore_all
-
 reschedule:	jal	schedule 
 
+EXPORT(ret_from_irq)
+EXPORT(ret_from_exception)
 EXPORT(ret_from_sys_call)
 		.type	ret_from_irq,@function
+		lw	t0, PT_STATUS(sp)	# returning to kernel mode?
+		andi	t0, t0, KU_USER
+		beqz	t0, restore_all
 
 		mfc0	t0, CP0_STATUS	# need_resched and signals atomic test
 		ori	t0, t0, 1
---
Atsushi Nemoto