From owner-svn-src-all@freebsd.org Thu Oct 15 17:50:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C495AA15303; Thu, 15 Oct 2015 17:50:29 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BA3A19D; Thu, 15 Oct 2015 17:50:29 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9FHoSKo077897; Thu, 15 Oct 2015 17:50:28 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FHoS7n077896; Thu, 15 Oct 2015 17:50:28 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201510151750.t9FHoS7n077896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 15 Oct 2015 17:50:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289373 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 17:50:29 -0000 Author: ed Date: Thu Oct 15 17:50:28 2015 New Revision: 289373 URL: https://svnweb.freebsd.org/changeset/base/289373 Log: Properly set the return value for casueword to 0 upon success. While trying to get multithreading working for CloudABI on aarch64, I noticed that compare-and-exchange operations in kernelspace would always fail. It turns out that we don't properly set the return value to 0 when the compare and exchange succeeds. Approved by: andrew Differential Revision: https://reviews.freebsd.org/D3899 Modified: head/sys/arm64/arm64/support.S Modified: head/sys/arm64/arm64/support.S ============================================================================== --- head/sys/arm64/arm64/support.S Thu Oct 15 17:40:39 2015 (r289372) +++ head/sys/arm64/arm64/support.S Thu Oct 15 17:50:28 2015 (r289373) @@ -59,6 +59,7 @@ ENTRY(casueword32) ldrb w0, [x0] /* Try loading the data */ 2: SET_FAULT_HANDLER(xzr, x5) /* Reset the fault handler */ str w4, [x2] /* Store the read data */ + mov x0, #0 /* Success */ ret /* Return */ END(casueword32) @@ -76,6 +77,7 @@ ENTRY(casueword) ldrb w0, [x0] /* Try loading the data */ 2: SET_FAULT_HANDLER(xzr, x5) /* Reset the fault handler */ str x4, [x2] /* Store the read data */ + mov x0, #0 /* Success */ ret /* Return */ END(casueword)