Subject: Re: yamt-idlelwp fallout for mips/cobalt?
To: None <ad@NetBSD.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-cobalt
Date: 05/25/2007 23:51:14
I wrote:

> Here is (probably) a proper trace (with some ugly hacked kernel):
 : 
> softclock+30c (8fffe000,802ce630,d,0) ra 8020efd4 sz 40
> softintr_dispatch+d4 (100,802ce630,d,0) ra 8020e304 sz 56
> cpu_intr+98 (100,802ce630,d,0) ra 801f7bb4 sz 56
> mips3_KernIntr+84 (cc6f0000,3edc9f,3edc5f,0) ra 801f81a0 sz 128
> mips3_VCEI+10 (cc6f0000,3edc9f,3edc5f,0) ra 0 sz 0

This is not in mips3_VCEI() but at the first instruction of
mips3_lwp_trampoline().

The following patch makes a LOCKDEBUG kernel work,
but I don't know if it's really correct.
---
Izumi Tsutsui


Index: arch/mips/mips/vm_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mips/mips/vm_machdep.c,v
retrieving revision 1.117
diff -u -r1.117 vm_machdep.c
--- arch/mips/mips/vm_machdep.c	17 May 2007 14:51:25 -0000	1.117
+++ arch/mips/mips/vm_machdep.c	25 May 2007 14:47:42 -0000
@@ -170,7 +170,9 @@
 	pcb->pcb_context[MIPS_CURLWP_CARD - 16] = (intptr_t)l2;/* S? */
 	pcb->pcb_context[8] = (intptr_t)f;		/* SP */
 	pcb->pcb_context[10] = (intptr_t)lwp_trampoline;/* RA */
+#if 0
 	pcb->pcb_context[11] |= PSL_LOWIPL;		/* SR */
+#endif
 #ifdef IPL_ICU_MASK
 	pcb->pcb_ppl = 0;	/* machine dependent interrupt mask */
 #endif