52c15bbd20
instead. With this change, we no longer need to save the current interrupt level in the switchframe. This is no great loss since both cpu_switch and cpu_switchto are always called at splsched, so the process' spl is effectively saved somewhere in the callstack. This fixes an evbarm problem reported by Allen Briggs: lwp gets into sa_switch -> mi_switch with newl != NULL when it's the last element on the runqueue, so it hits the second bit of: if (newl == NULL) { retval = cpu_switch(l, NULL); } else { remrunqueue(newl); cpu_switchto(l, newl); retval = 0; } mi_switch calls remrunqueue() and cpu_switchto() cpu_switchto unlocks the sched lock cpu_switchto drops CPU priority softclock is received schedcpu is called from softclock schedcpu hits the first if () {} block here: if (l->l_priority >= PUSER) { if (l->l_stat == LSRUN && (l->l_flag & L_INMEM) && (l->l_priority / PPQ) != (l->l_usrpri / PPQ)) { remrunqueue(l); l->l_priority = l->l_usrpri; setrunqueue(l); } else l->l_priority = l->l_usrpri; } Since mi_switch has already run remrunqueue, the LWP has been removed, but it's not been put back on any queue, so the remrunqueue panics. |
||
---|---|---|
.. | ||
arm32_machdep.c | ||
atomic.S | ||
bcopy_page.S | ||
bus_dma.c | ||
cpu.c | ||
cpuswitch.S | ||
db_interface.c | ||
db_machdep.c | ||
exception.S | ||
fault.c | ||
fusu.S | ||
genassym.cf | ||
intr.c | ||
irq_dispatch.S | ||
kgdb_machdep.c | ||
locore.S | ||
mem.c | ||
pmap.c | ||
setcpsr.S | ||
setstack.S | ||
spl.S | ||
stubs.c | ||
sys_machdep.c | ||
vm_machdep.c |