Index: sys/arch/arm/arm32/arm32_machdep.c =================================================================== RCS file: /cvsroot/src/sys/arch/arm/arm32/arm32_machdep.c,v retrieving revision 1.76 diff -u -p -u -r1.76 arm32_machdep.c --- sys/arch/arm/arm32/arm32_machdep.c 30 Jun 2011 20:09:19 -0000 1.76 +++ sys/arch/arm/arm32/arm32_machdep.c 16 Jul 2012 06:15:53 -0000 @@ -59,11 +59,12 @@ __KERNEL_RCSID(0, "$NetBSD: arm32_machde #include #include #include -#include #include #include #include +#include + #include #include @@ -449,19 +450,21 @@ dosoftints(void) const int opl = ci->ci_cpl; const uint32_t softiplmask = SOFTIPLMASK(opl); + splhigh(); for (;;) { u_int softints = ci->ci_softints & softiplmask; KASSERT((softints != 0) == ((ci->ci_softints >> opl) != 0)); - if (softints == 0) + KASSERT(opl == IPL_NONE || (softints & (1 << (opl - IPL_SOFTCLOCK))) == 0); + if (softints == 0) { + splx(opl); return; - ci->ci_cpl = IPL_HIGH; + } #define DOSOFTINT(n) \ - if (softints & (1 << (IPL_SOFT ## n - IPL_SOFTCLOCK))) { \ + if (ci->ci_softints & (1 << (IPL_SOFT ## n - IPL_SOFTCLOCK))) { \ ci->ci_softints &= \ ~(1 << (IPL_SOFT ## n - IPL_SOFTCLOCK)); \ softint_switch(ci->ci_softlwps[SOFTINT_ ## n], \ IPL_SOFT ## n); \ - ci->ci_cpl = opl; \ continue; \ } DOSOFTINT(SERIAL); Index: sys/arch/arm/include/cpu.h =================================================================== RCS file: /cvsroot/src/sys/arch/arm/include/cpu.h,v retrieving revision 1.63 diff -u -p -u -r1.63 cpu.h --- sys/arch/arm/include/cpu.h 16 Feb 2012 02:30:32 -0000 1.63 +++ sys/arch/arm/include/cpu.h 16 Jul 2012 06:15:54 -0000 @@ -247,7 +247,7 @@ struct cpu_info { struct pcb *ci_curpcb; /* current pcb */ #ifdef __HAVE_FAST_SOFTINTS lwp_t *ci_softlwps[SOFTINT_COUNT]; - uint32_t ci_softints; + volatile uint32_t ci_softints; #endif #if !defined(PROCESS_ID_IS_CURLWP) lwp_t *ci_curlwp; /* current lwp */