Subject: RE: CPU specific idle routine
To: Toru Nishimura <nisimura@itc.aist-nara.ac.jp>
From: TAKEMURA, Shin <takemura@netbsd.org>
List: port-mips
Date: 01/23/2000 15:57:30
Though the discussion is unresolved yet, I made a new patch for
reference.
If this patch was appried, I can override a cpu_idle member as
follows:
mips_locore_dumpvec.cpu_idle = vr_idle();
Index: include/locore.h
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/mips/include/locore.h,v
retrieving revision 1.23
diff -r1.23 locore.h
54a55
> extern void mips_idle __P((void));
124a126
> void (*cpu_idle) __P((void));
cvs server: Diffing mips
Index: mips/genassym.cf
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/mips/mips/genassym.cf,v
retrieving revision 1.13
diff -r1.13 genassym.cf
82a83
> define MIPSX_CPU_IDLE offsetof(mips_locore_jumpvec_t,
cpu_idle
)
Index: mips/locore.S
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/mips/mips/locore.S,v
retrieving revision 1.84
diff -r1.84 locore.S
262c262
< LEAF(idle)
---
> LEAF(mips_idle)
288c288
< END(idle)
---
> END(mips_idle)
318c318,322
< beq t1, zero, _C_LABEL(idle)
---
> bne t1, zero, 1f
> lw t2, _C_LABEL(mips_locore_jumpvec) + MIPSX_CPU_IDLE
> jal ra, t2
> nop
> 1:
331c335,339
< beq t0, zero, _C_LABEL(idle) # if none, idle
---
> bne t0, zero, 1f
> lw t3, _C_LABEL(mips_locore_jumpvec) + MIPSX_CPU_IDLE
> jal ra, t3
> nop
> 1:
Index: mips/mips_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/mips/mips/mips_machdep.c,v
retrieving revision 1.63
diff -r1.63 mips_machdep.c
151c151,152
< mips1_cpu_switch_resume
---
> mips1_cpu_switch_resume,
> mips_idle
208c209,210
< mips3_cpu_switch_resume
---
> mips3_cpu_switch_resume,
> mips_idle
Index: mips/trap.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/mips/mips/trap.c,v
retrieving revision 1.118
diff -r1.118 trap.c
1159c1159
< extern void idle __P((void));
---
> extern void mips_idle __P((void));
1462c1462
< Name(idle),
---
> Name(mips_idle),
-------- end of attachment