PERFORCE change 35929 for review
John Baldwin
jhb at FreeBSD.org
Mon Aug 11 10:10:37 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=35929
Change 35929 by jhb at jhb_laptop on 2003/08/11 10:10:25
Call pmap_deactivate() before Lcs1 so cpu_throw doesn't call it.
Reported by: marcel
Affected files ...
.. //depot/projects/smpng/sys/alpha/alpha/swtch.s#6 edit
Differences ...
==== //depot/projects/smpng/sys/alpha/alpha/swtch.s#6 (text+ko) ====
@@ -126,22 +126,7 @@
mov a0, s0 /* s0 = old curthread */
mov a2, s1 /* s1 = old pcb */
-sw1:
- br pv, Lcs1
-Lcs1: LDGP(pv)
- mov a1, s2 /* s2 = new thread */
- ldq s3, TD_MD_PCBPADDR(s2) /* s3 = new pcbpaddr */
-
-#ifdef SMP
/*
- * Save fp state if we have some.
- */
- mov s0, a0 /* curthread */
- ldiq a1, 1 /* clear fpcurthread */
- CALL(alpha_fpstate_save)
-#endif
-
- /*
* Deactivate the old address space before activating the
* new one. We need to do this before activating the
* new thread's address space in the event that new
@@ -155,12 +140,24 @@
* taken care of calling pmap_deactivate() in cpu_exit(),
* before the vmspace went away.
*/
- beq s0, Lcs6
+ beq a0, sw1
+ CALL(pmap_deactivate) /* pmap_deactivate(oldthread) */
+
+sw1:
+ br pv, Lcs1
+Lcs1: LDGP(pv)
+ mov a1, s2 /* s2 = new thread */
+ ldq s3, TD_MD_PCBPADDR(s2) /* s3 = new pcbpaddr */
- mov s0, a0 /* pmap_deactivate(oldthread) */
- CALL(pmap_deactivate) /* XXXKSE */
+#ifdef SMP
+ /*
+ * Save fp state if we have some.
+ */
+ mov s0, a0 /* curthread */
+ ldiq a1, 1 /* clear fpcurthread */
+ CALL(alpha_fpstate_save)
+#endif
-Lcs6:
/*
* Activate the new thread's address space and perform
* the actual context swap.
@@ -172,8 +169,6 @@
mov s3, a0 /* swap the context */
SWITCH_CONTEXT
-Lcs7:
-
/*
* Now that the switch is done, update curthread and other
* globals.
More information about the p4-projects
mailing list