Port-mips archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CURLWP global register in NetBSD/mips
Guys,
NetBSD/mips kernel uses a dedicated register to hold curlwp
global variable. Register S7 is used in -current whileT8 in
matt-nb5-mips64 branch (why differ?)
The place where curlwp register is reassigned is pretty
limited. As far as I understand, only cpu_switchto() does it.
Looking at cpu_lwp_fork() bottom half, we find a sequence
to assign values for newlwp's switchframe. The following line
pcb->pcb_context.val[MIPS_CURLWP_LABEL] = (intptr_t)l2;
is supposed to make the dedicated curlwp register to hold
newlwp at the very bottom of cpu_switchto().
During the context switch steps, cpu_switchto() assigns newlwp
value to the reserved register anyway. So, this particular
switchframe arrangement for cpu_switchto() bottom makes little
sense.
Now I propose here;
1. remove [... _CURLWP_LABEL] arrangement in vm_machdep.c
2. remove S7 (T8) value restoration at the bottom of cpu_switchto().
Comments are welcome.
Toru Nishimura / ALKYL Technology
Home |
Main Index |
Thread Index |
Old Index