version 1.12, 2011/06/16 02:43:43 |
version 1.13, 2011/06/16 04:37:48 |
Line 693 splraise(int ncpl) |
|
Line 693 splraise(int ncpl) |
|
return ocpl; |
return ocpl; |
} |
} |
|
|
|
static inline bool |
|
have_pending_intr_p(struct cpu_info *ci, int ncpl) |
|
{ |
|
if (ci->ci_ipending & ~imask[ncpl]) |
|
return true; |
|
#ifdef __HAVE_FAST_SOFTINTS |
|
if ((ci->ci_data.cpu_softints << ncpl) & IPL_SOFTMASK) |
|
return true; |
|
#endif |
|
return false; |
|
} |
|
|
void |
void |
splx(int ncpl) |
splx(int ncpl) |
{ |
{ |
|
|
__insn_barrier(); |
__insn_barrier(); |
__asm volatile("sync; eieio"); /* reorder protect */ |
__asm volatile("sync; eieio"); /* reorder protect */ |
ci->ci_cpl = ncpl; |
ci->ci_cpl = ncpl; |
if ((ci->ci_ipending & ~imask[ncpl]) || |
if (have_pending_intr_p(ci, ncpl)) |
((ci->ci_data.cpu_softints << ncpl) & IPL_SOFTMASK)) |
|
pic_do_pending_int(); |
pic_do_pending_int(); |
|
|
__asm volatile("sync; eieio"); /* reorder protect */ |
__asm volatile("sync; eieio"); /* reorder protect */ |
} |
} |
|
|
Line 717 spllower(int ncpl) |
|
Line 729 spllower(int ncpl) |
|
__asm volatile("sync; eieio"); /* reorder protect */ |
__asm volatile("sync; eieio"); /* reorder protect */ |
ocpl = ci->ci_cpl; |
ocpl = ci->ci_cpl; |
ci->ci_cpl = ncpl; |
ci->ci_cpl = ncpl; |
if ((ci->ci_ipending & ~imask[ncpl]) || |
if (have_pending_intr_p(ci, ncpl)) |
((ci->ci_data.cpu_softints << ncpl) & IPL_SOFTMASK)) |
|
pic_do_pending_int(); |
pic_do_pending_int(); |
__asm volatile("sync; eieio"); /* reorder protect */ |
__asm volatile("sync; eieio"); /* reorder protect */ |
return ocpl; |
return ocpl; |