Date: Mon, 11 Aug 2003 10:10:34 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 35929 for review Message-ID: <200308111710.h7BHAYqL054069@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=35929 Change 35929 by jhb@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200308111710.h7BHAYqL054069>