aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64
diff options
context:
space:
mode:
authorMatthew Dillon <dillon@FreeBSD.org>2000-03-29 06:15:43 +0000
committerMatthew Dillon <dillon@FreeBSD.org>2000-03-29 06:15:43 +0000
commitbd5caafc4d72c67d579937755e3f7d8e48c96c69 (patch)
tree2f0f0aedab0a845697909cfd96c548f2a205a787 /sys/amd64
parent863bdc0cff1b45a4a59ce57839f91d2348f159f3 (diff)
downloadsrc-bd5caafc4d72c67d579937755e3f7d8e48c96c69.tar.gz
src-bd5caafc4d72c67d579937755e3f7d8e48c96c69.zip
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.
Notes
Notes: svn path=/head/; revision=58764
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/apic_vector.S6
-rw-r--r--sys/amd64/amd64/cpu_switch.S2
-rw-r--r--sys/amd64/amd64/exception.S2
-rw-r--r--sys/amd64/amd64/exception.s2
-rw-r--r--sys/amd64/amd64/swtch.s2
5 files changed, 6 insertions, 8 deletions
diff --git a/sys/amd64/amd64/apic_vector.S b/sys/amd64/amd64/apic_vector.S
index 587d763a4573..602b4ce6662c 100644
--- a/sys/amd64/amd64/apic_vector.S
+++ b/sys/amd64/amd64/apic_vector.S
@@ -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
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S
index a05d541d1051..b9b5148d513b 100644
--- a/sys/amd64/amd64/cpu_switch.S
+++ b/sys/amd64/amd64/cpu_switch.S
@@ -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)
diff --git a/sys/amd64/amd64/exception.S b/sys/amd64/amd64/exception.S
index 91c5b8aa6885..e3d5e35ee7b7 100644
--- a/sys/amd64/amd64/exception.S
+++ b/sys/amd64/amd64/exception.S
@@ -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
diff --git a/sys/amd64/amd64/exception.s b/sys/amd64/amd64/exception.s
index 91c5b8aa6885..e3d5e35ee7b7 100644
--- a/sys/amd64/amd64/exception.s
+++ b/sys/amd64/amd64/exception.s
@@ -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
diff --git a/sys/amd64/amd64/swtch.s b/sys/amd64/amd64/swtch.s
index a05d541d1051..b9b5148d513b 100644
--- a/sys/amd64/amd64/swtch.s
+++ b/sys/amd64/amd64/swtch.s
@@ -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)