From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A8263A0524 for ; Fri, 5 Feb 2021 12:35:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A1CEB40682; Fri, 5 Feb 2021 12:35:43 +0100 (CET) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mails.dpdk.org (Postfix) with ESMTP id 0CACC40682 for ; Fri, 5 Feb 2021 12:35:42 +0100 (CET) Received: by mail-wm1-f41.google.com with SMTP id 190so5763460wmz.0 for ; Fri, 05 Feb 2021 03:35:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bBAX/ImseY7p6DMxFjDsHlXJmtFHfugOZD2Pm3Fb8yg=; b=Df+L/BHcjZi7NhQPPCuv7I1ec7TDrOv+9XBCTR9t5bmuyPLGUMUmi3f7pJeaOqNpx3 F799TYDlpFjSsWGsAc/QfoEKRtok8gIhOT7JT2PAlBdF1LNpAdggm4dRWftPAROQM5AQ QEjvxBx009wdeJ0oE2Nd/Bhf6J1SHDDp4izAphVyNKjIEgQlS/LS3BvU3Nj03FZH8gKa SNh0gYbxASX1d09P/zodRPxpWcuNljE73GjmOvjpQ1oLhdN3MyA78LbUNfu9vviVYwdv aSSqDKcr0cEM6jtkNWX0Qh86VcVoXMC+nj1aaArrzUzJ/7CAeKbyuzWlN4gbP/OAhPi4 USvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bBAX/ImseY7p6DMxFjDsHlXJmtFHfugOZD2Pm3Fb8yg=; b=p0RIeySXy7T042Mz6FvwXFG58mvd/i4jMMCAzWDbgil6dAxg4sv881vbhU2Gl554Ex DcGVLztxTvnPmPeYgBly36vllUlVm4ji7MPecE+rsRwZRJlF4bFo+REMao0h8XWGDiTg D1dARQuOp1lVp1tLgnz3OA2Px7x8hYdhBm9UWNrlcApkKWEDBKCNrObnhP/4QTrX6beX /vaFG4vWxZj5Z6rVUSIO4GB8RBfwAXgJNi2Abvw9R/OUb0f8i9i1R1hw/CrjsUBHSfKp M8X0ZAJ6z392cGPa7VYQ23A40yW3BbmmL5QU64mfGI93Fr2ZqHAiHw0Z97UH7wR43b+h RBWQ== X-Gm-Message-State: AOAM5310RCNd498RD42iTJhk3RaJ9XB4+6to/maI6gx7IgtSAf/t7G3K bmDrcQSflxIucPiwbeibqlsoFoezP1bK2Ljh X-Google-Smtp-Source: ABdhPJxFwGKwQmyqhh3So9wyMth7iIOy5K/hfRCSB7VPRT8PuWMpuMe1MiMixQgTD+XRJ2U6dIpq0g== X-Received: by 2002:a05:600c:20f:: with SMTP id 15mr3253031wmi.148.1612524941786; Fri, 05 Feb 2021 03:35:41 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id c2sm8932072wmd.10.2021.02.05.03.35.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:35:41 -0800 (PST) From: luca.boccassi@gmail.com To: Joyce Kong Cc: Ruifeng Wang , Jerin Jacob , dpdk stable Date: Fri, 5 Feb 2021 11:18:02 +0000 Message-Id: <20210205111920.1272063-196-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'eal/arm: fix debug build with gcc for 128-bit atomics' has been queued to stable release 20.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/e89a62391eb8d9da9e47e231bbae339d94df5b90 Thanks. Luca Boccassi --- >From e89a62391eb8d9da9e47e231bbae339d94df5b90 Mon Sep 17 00:00:00 2001 From: Joyce Kong Date: Fri, 15 Jan 2021 17:58:21 +0800 Subject: [PATCH] eal/arm: fix debug build with gcc for 128-bit atomics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 36d406c5139fa0160a1d3686f5b2413a2f9ee83b ] Compiling with "meson build -Dbuildtype=debug --cross-file config/arm/arm64_thunderx2_linux_gcc" shows the warnings "function returns an aggregate [-Waggregate-return]": ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h: In function ‘__cas_128_relaxed’: ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:81:20: error: function returns an aggregate [-Werror=aggregate-return] __ATOMIC128_CAS_OP(__cas_128_relaxed, "casp") ^~~~~~~~~~~~~~~~~ Fix the compiling issue by defining __ATOMIC128_CAS_OP as a void function and passing the address pointer into it. Fixes: 7e2c3e17fe2c ("eal/arm64: add 128-bit atomic compare exchange") Signed-off-by: Joyce Kong Reviewed-by: Ruifeng Wang Acked-by: Jerin Jacob --- lib/librte_eal/arm/include/rte_atomic_64.h | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/librte_eal/arm/include/rte_atomic_64.h b/lib/librte_eal/arm/include/rte_atomic_64.h index 467d32a455..fa6f334c0d 100644 --- a/lib/librte_eal/arm/include/rte_atomic_64.h +++ b/lib/librte_eal/arm/include/rte_atomic_64.h @@ -53,15 +53,15 @@ rte_atomic_thread_fence(int memorder) #endif #define __ATOMIC128_CAS_OP(cas_op_name, op_string) \ -static __rte_noinline rte_int128_t \ -cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t updated) \ +static __rte_noinline void \ +cas_op_name(rte_int128_t *dst, rte_int128_t *old, rte_int128_t updated) \ { \ /* caspX instructions register pair must start from even-numbered * register at operand 1. * So, specify registers for local variables here. */ \ - register uint64_t x0 __asm("x0") = (uint64_t)old.val[0]; \ - register uint64_t x1 __asm("x1") = (uint64_t)old.val[1]; \ + register uint64_t x0 __asm("x0") = (uint64_t)old->val[0]; \ + register uint64_t x1 __asm("x1") = (uint64_t)old->val[1]; \ register uint64_t x2 __asm("x2") = (uint64_t)updated.val[0]; \ register uint64_t x3 __asm("x3") = (uint64_t)updated.val[1]; \ asm volatile( \ @@ -73,9 +73,8 @@ cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t updated) \ [upd1] "r" (x3), \ [dst] "r" (dst) \ : "memory"); \ - old.val[0] = x0; \ - old.val[1] = x1; \ - return old; \ + old->val[0] = x0; \ + old->val[1] = x1; \ } __ATOMIC128_CAS_OP(__cas_128_relaxed, "casp") @@ -113,13 +112,14 @@ rte_atomic128_cmp_exchange(rte_int128_t *dst, rte_int128_t *exp, #if defined(__ARM_FEATURE_ATOMICS) || defined(RTE_ARM_FEATURE_ATOMICS) if (success == __ATOMIC_RELAXED) - old = __cas_128_relaxed(dst, expected, desired); + __cas_128_relaxed(dst, exp, desired); else if (success == __ATOMIC_ACQUIRE) - old = __cas_128_acquire(dst, expected, desired); + __cas_128_acquire(dst, exp, desired); else if (success == __ATOMIC_RELEASE) - old = __cas_128_release(dst, expected, desired); + __cas_128_release(dst, exp, desired); else - old = __cas_128_acq_rel(dst, expected, desired); + __cas_128_acq_rel(dst, exp, desired); + old = *exp; #else #define __HAS_ACQ(mo) ((mo) != __ATOMIC_RELAXED && (mo) != __ATOMIC_RELEASE) #define __HAS_RLS(mo) ((mo) == __ATOMIC_RELEASE || (mo) == __ATOMIC_ACQ_REL || \ @@ -183,12 +183,12 @@ rte_atomic128_cmp_exchange(rte_int128_t *dst, rte_int128_t *exp, #undef __STORE_128 } while (unlikely(ret)); -#endif - /* Unconditionally updating expected removes an 'if' statement. - * expected should already be in register if not in the cache. + /* Unconditionally updating the value of exp removes an 'if' statement. + * The value of exp should already be in register if not in the cache. */ *exp = old; +#endif return (old.int128 == expected.int128); } -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:37.927166041 +0000 +++ 0196-eal-arm-fix-debug-build-with-gcc-for-128-bit-atomics.patch 2021-02-05 11:18:29.150697661 +0000 @@ -1 +1 @@ -From 36d406c5139fa0160a1d3686f5b2413a2f9ee83b Mon Sep 17 00:00:00 2001 +From e89a62391eb8d9da9e47e231bbae339d94df5b90 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 36d406c5139fa0160a1d3686f5b2413a2f9ee83b ] + @@ -23 +24,0 @@ -Cc: stable@dpdk.org