From nobody Thu Feb 17 08:43:24 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3C5AF19D9180; Thu, 17 Feb 2022 08:43:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JzpJF35Pqz3qC1; Thu, 17 Feb 2022 08:43:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645087405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5IsjMRv/9yvmBRr44ZCyTfeUZwM/J9fh6ox6EUHlFxs=; b=j2IukV9Jz0/QDXqdXa6298L6u6EILto4hFVbAy0r2ybxOvX4h1QRpC6mR/JG43pQ5j9vsY voYxFBzwJoMTeAxCFv1O/1Fahf/ioiJniqwVzdCYY8hPRq0KtBb3CShBcTqfplzxhNMG32 PnYW2SCQr7lz1m7dI9VfzeFKnp0x5G2JSUAeCmUSi7o+FMPx71wZhwtE3kjKt59rw60IkJ mVILDNW+BkrylY1GRjJcghl36AKil/ADJOQtRw4PwPNab76Obu9O7qsVGja6kh+aNO8Kqb jmC/Y10OlYQJ67DuZIpxCUeQRePdHBHZ04pNcqBxfotncilWeDVuPCp86nLeog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC03E26839; Thu, 17 Feb 2022 08:43:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21H8hOcq045243; Thu, 17 Feb 2022 08:43:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21H8hOIv045242; Thu, 17 Feb 2022 08:43:24 GMT (envelope-from git) Date: Thu, 17 Feb 2022 08:43:24 GMT Message-Id: <202202170843.21H8hOIv045242@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 1889bed23deb - main - linuxkpi: Add atomic64_fetch_add List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1889bed23debb2029970c0f8e79db6b622c3cb09 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645087405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5IsjMRv/9yvmBRr44ZCyTfeUZwM/J9fh6ox6EUHlFxs=; b=s4uXOn2qlu8IKRG3FLskovsh6/NObjasLjokzVmMG1DASd521kSNudcF3aUjO1ri8HUh/4 sMF1WALOWg9Lo89HOOcpNkXdtnmZDpC8FDLpOeQ9c1dkMBM4srWQfgXytgIUXhpNBTu97g bEO9o3hdzL6MRZDbQe0AI0d3ZT4G6FTYC30QuovzDTRe0KXGGM4+O3LPgtAlT4e19pomrF 29Dz2nC3Api669hQE09CoOEJ7CqI9vCF6u2GWbxF0eB/TyXsaKXM7GpJ/OrzEsvc2BblzV sR6B25e4d6OJ0craOfP9IkSoa+XiSyG3klFXbCcKlzCQ64q5MtPaG+TWAlNs9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645087405; a=rsa-sha256; cv=none; b=Ek2wRwo+3OlJ9U1KfdHI2+MXPnVu93i5rDCPoOXZRZL9SnkkJkEedSXx/KTbu74tXQOs4j owNz0SmkPRodzbZ8A0PSo3mJiqNUth+4vVhuyYbfh7XiXRUEN7BD91popgXwfG61xaUyUq htiOz6i/XH7JoPhM1AtDqHLTTRrJM0sFx2hQOOGLTPr6iT0f+5jnK1YyOs+eFCGS0gnyJf nQd+ZJR1vg/JHsevL44EaHP1i7YMxCTk9bGMovacbQRX+la3qlJxfpT6tsRx9fy0Dd4c95 HAQu+JAqEcNi59PfA4xiqO+PaESr5VJZpqR7MqVWA0BaaXO0had9lCwn7RKYGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=1889bed23debb2029970c0f8e79db6b622c3cb09 commit 1889bed23debb2029970c0f8e79db6b622c3cb09 Author: Emmanuel Vadot AuthorDate: 2022-02-16 09:44:55 +0000 Commit: Emmanuel Vadot CommitDate: 2022-02-17 08:31:39 +0000 linuxkpi: Add atomic64_fetch_add Linux variant of atomic_fetchadd_64. Reviewed by: bz MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D34296 --- sys/compat/linuxkpi/common/include/asm/atomic64.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/asm/atomic64.h b/sys/compat/linuxkpi/common/include/asm/atomic64.h index b53063620bb2..4ee0fa5ecf84 100644 --- a/sys/compat/linuxkpi/common/include/asm/atomic64.h +++ b/sys/compat/linuxkpi/common/include/asm/atomic64.h @@ -52,6 +52,12 @@ typedef struct { #define atomic64_dec_return(v) atomic64_sub_return(1, (v)) #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) +static inline int64_t +atomic64_fetch_add(int64_t i, atomic64_t *v) +{ + return (atomic_fetchadd_64(&v->counter, i)); +} + static inline int64_t atomic64_add_return(int64_t i, atomic64_t *v) {