The SMP cleanup commit broke need_resched, this fixes that and also
removed unncessary MPLOCKED and 'lock' prefixes from the interrupt nesting level, since (A) the MP lock is held at the time, and (B) since the neting level is restored prior to return any interrupted code will see a consistent value.
This commit is contained in:
parent
863bdc0cff
commit
bd5caafc4d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58764
@ -455,8 +455,7 @@ _Xcpuast:
|
||||
|
||||
movl _cpl, %eax
|
||||
pushl %eax
|
||||
movl $1, _astpending /* XXX */
|
||||
lock
|
||||
orl $AST_PENDING, _astpending /* XXX */
|
||||
incb _intr_nesting_level
|
||||
sti
|
||||
|
||||
@ -468,7 +467,7 @@ _Xcpuast:
|
||||
lock
|
||||
btrl %eax, CNAME(resched_cpus)
|
||||
jnc 2f
|
||||
orl $AST_RESCHED,_astpending
|
||||
orl $AST_PENDING+AST_RESCHED,_astpending
|
||||
lock
|
||||
incl CNAME(want_resched_cnt)
|
||||
2:
|
||||
@ -512,7 +511,6 @@ _Xforward_irq:
|
||||
|
||||
movl _cpl, %eax
|
||||
pushl %eax
|
||||
lock
|
||||
incb _intr_nesting_level
|
||||
sti
|
||||
|
||||
|
@ -363,7 +363,7 @@ sw1a:
|
||||
movl %eax,%ecx
|
||||
|
||||
xorl %eax,%eax
|
||||
andl $~WANT_RESCHED,_astpending
|
||||
andl $~AST_RESCHED,_astpending
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
cmpl %eax,P_WCHAN(%ecx)
|
||||
|
@ -238,7 +238,7 @@ calltrap:
|
||||
*/
|
||||
pushl %ebx /* cpl to restore */
|
||||
subl $4,%esp /* dummy unit to finish intr frame */
|
||||
MPLOCKED incb _intr_nesting_level
|
||||
incb _intr_nesting_level
|
||||
MEXITCOUNT
|
||||
jmp _doreti
|
||||
|
||||
|
@ -238,7 +238,7 @@ calltrap:
|
||||
*/
|
||||
pushl %ebx /* cpl to restore */
|
||||
subl $4,%esp /* dummy unit to finish intr frame */
|
||||
MPLOCKED incb _intr_nesting_level
|
||||
incb _intr_nesting_level
|
||||
MEXITCOUNT
|
||||
jmp _doreti
|
||||
|
||||
|
@ -363,7 +363,7 @@ sw1a:
|
||||
movl %eax,%ecx
|
||||
|
||||
xorl %eax,%eax
|
||||
andl $~WANT_RESCHED,_astpending
|
||||
andl $~AST_RESCHED,_astpending
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
cmpl %eax,P_WCHAN(%ecx)
|
||||
|
@ -455,8 +455,7 @@ _Xcpuast:
|
||||
|
||||
movl _cpl, %eax
|
||||
pushl %eax
|
||||
movl $1, _astpending /* XXX */
|
||||
lock
|
||||
orl $AST_PENDING, _astpending /* XXX */
|
||||
incb _intr_nesting_level
|
||||
sti
|
||||
|
||||
@ -468,7 +467,7 @@ _Xcpuast:
|
||||
lock
|
||||
btrl %eax, CNAME(resched_cpus)
|
||||
jnc 2f
|
||||
orl $AST_RESCHED,_astpending
|
||||
orl $AST_PENDING+AST_RESCHED,_astpending
|
||||
lock
|
||||
incl CNAME(want_resched_cnt)
|
||||
2:
|
||||
@ -512,7 +511,6 @@ _Xforward_irq:
|
||||
|
||||
movl _cpl, %eax
|
||||
pushl %eax
|
||||
lock
|
||||
incb _intr_nesting_level
|
||||
sti
|
||||
|
||||
|
@ -238,7 +238,7 @@ calltrap:
|
||||
*/
|
||||
pushl %ebx /* cpl to restore */
|
||||
subl $4,%esp /* dummy unit to finish intr frame */
|
||||
MPLOCKED incb _intr_nesting_level
|
||||
incb _intr_nesting_level
|
||||
MEXITCOUNT
|
||||
jmp _doreti
|
||||
|
||||
|
@ -363,7 +363,7 @@ sw1a:
|
||||
movl %eax,%ecx
|
||||
|
||||
xorl %eax,%eax
|
||||
andl $~WANT_RESCHED,_astpending
|
||||
andl $~AST_RESCHED,_astpending
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
cmpl %eax,P_WCHAN(%ecx)
|
||||
|
@ -141,7 +141,7 @@ ENTRY(vm86_bioscall)
|
||||
pushl _cpl /* cpl to restore */
|
||||
#endif
|
||||
subl $4,%esp /* dummy unit */
|
||||
MPLOCKED incb _intr_nesting_level
|
||||
incb _intr_nesting_level
|
||||
MEXITCOUNT
|
||||
jmp _doreti
|
||||
|
||||
|
@ -455,8 +455,7 @@ _Xcpuast:
|
||||
|
||||
movl _cpl, %eax
|
||||
pushl %eax
|
||||
movl $1, _astpending /* XXX */
|
||||
lock
|
||||
orl $AST_PENDING, _astpending /* XXX */
|
||||
incb _intr_nesting_level
|
||||
sti
|
||||
|
||||
@ -468,7 +467,7 @@ _Xcpuast:
|
||||
lock
|
||||
btrl %eax, CNAME(resched_cpus)
|
||||
jnc 2f
|
||||
orl $AST_RESCHED,_astpending
|
||||
orl $AST_PENDING+AST_RESCHED,_astpending
|
||||
lock
|
||||
incl CNAME(want_resched_cnt)
|
||||
2:
|
||||
@ -512,7 +511,6 @@ _Xforward_irq:
|
||||
|
||||
movl _cpl, %eax
|
||||
pushl %eax
|
||||
lock
|
||||
incb _intr_nesting_level
|
||||
sti
|
||||
|
||||
|
@ -123,10 +123,10 @@ doreti_next2:
|
||||
andl _ipending,%ecx /* set bit = unmasked pending INT */
|
||||
jne doreti_unpend
|
||||
movl %eax,_cpl
|
||||
MPLOCKED decb _intr_nesting_level
|
||||
decb _intr_nesting_level
|
||||
|
||||
/* Check for ASTs that can be handled now. */
|
||||
cmpb $0,_astpending
|
||||
cmpl $0,_astpending
|
||||
je doreti_exit
|
||||
testb $SEL_RPL_MASK,TF_CS(%esp)
|
||||
jne doreti_ast
|
||||
@ -271,7 +271,7 @@ doreti_swi:
|
||||
|
||||
ALIGN_TEXT
|
||||
doreti_ast:
|
||||
movl $0,_astpending
|
||||
andl $~AST_PENDING,_astpending
|
||||
sti
|
||||
movl $T_ASTFLT,TF_TRAPNO(%esp)
|
||||
call _trap
|
||||
|
Loading…
Reference in New Issue
Block a user