NetBSD/sys/arch/arm/arm32
scw 52c15bbd20 Don't drop to spl0 in cpu_switch/cpu_switchto. Do it in the idle loop
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.
2003-10-23 08:59:10 +00:00
..
arm32_machdep.c
atomic.S
bcopy_page.S Xscale-optimised b{copy,zero}_page(). 2003-10-13 21:03:13 +00:00
bus_dma.c
cpu.c
cpuswitch.S Don't drop to spl0 in cpu_switch/cpu_switchto. Do it in the idle loop 2003-10-23 08:59:10 +00:00
db_interface.c
db_machdep.c
exception.S
fault.c Remove the #ifdef __XSCALE__ around the strd test as the instruction 2003-10-15 14:07:03 +00:00
fusu.S
genassym.cf
intr.c
irq_dispatch.S
kgdb_machdep.c
locore.S
mem.c switch ARM to use same minor for /dev/zero as other archs 2003-10-16 12:02:58 +00:00
pmap.c On Xscale, define PMAP_UAREA() and use it to tweak uarea mappings so 2003-10-13 20:50:34 +00:00
setcpsr.S
setstack.S
spl.S
stubs.c
sys_machdep.c
vm_machdep.c Don't drop to spl0 in cpu_switch/cpu_switchto. Do it in the idle loop 2003-10-23 08:59:10 +00:00