From owner-cvs-src-old@FreeBSD.ORG Sat Apr 4 22:23:15 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2116106567C for ; Sat, 4 Apr 2009 22:23:15 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BEB158FC1E for ; Sat, 4 Apr 2009 22:23:15 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n34MNF56035139 for ; Sat, 4 Apr 2009 22:23:15 GMT (envelope-from marcel@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n34MNFK5035138 for cvs-src-old@freebsd.org; Sat, 4 Apr 2009 22:23:15 GMT (envelope-from marcel@repoman.freebsd.org) Message-Id: <200904042223.n34MNFK5035138@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to marcel@repoman.freebsd.org using -f From: Marcel Moolenaar Date: Sat, 4 Apr 2009 22:23:03 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/powerpc/aim swtch.S X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Apr 2009 22:23:16 -0000 marcel 2009-04-04 22:23:03 UTC FreeBSD src repository Modified files: sys/powerpc/aim swtch.S Log: SVN rev 190704 on 2009-04-04 22:23:03Z by marcel Perform a dummy stwcx. when we switch contexts. The context being switched out may hold a reservation. The stwcx. will clear the reservation. This is architecturally recommended. The scenario this addresses is as follows: 1. Thread 1 performs a lwarx and as such holds a reservation. 2. Thread 1 gets switched out (before doing the matching stwcx.) and thread 2 is switched in. 3. Thread 2 performs a stwcx. to the same reservation granule. This will succeed because the processor has the reservation even though thread 2 didn't do the lwarx. Note that on some processors the address given the stwcx. is not checked. On these processors the mere condition of having a reservation would cause the stwcx. to succeed, irrespective of whether the addresses are the same. The dummy stwcx. is especially important for those processors. Revision Changes Path 1.28 +6 -0 src/sys/powerpc/aim/swtch.S