From owner-p4-projects@FreeBSD.ORG Mon Aug 11 10:10:36 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C389137B404; Mon, 11 Aug 2003 10:10:35 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 794FA37B401 for ; Mon, 11 Aug 2003 10:10:35 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A4E043FA3 for ; Mon, 11 Aug 2003 10:10:35 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h7BHAY0U054072 for ; Mon, 11 Aug 2003 10:10:34 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h7BHAYqL054069 for perforce@freebsd.org; Mon, 11 Aug 2003 10:10:34 -0700 (PDT) Date: Mon, 11 Aug 2003 10:10:34 -0700 (PDT) Message-Id: <200308111710.h7BHAYqL054069@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 35929 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2003 17:10:37 -0000 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.