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 4C4B7A0524 for ; Fri, 5 Feb 2021 12:30:16 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 453DD1889F6; Fri, 5 Feb 2021 12:30:16 +0100 (CET) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mails.dpdk.org (Postfix) with ESMTP id 29E7140682 for ; Fri, 5 Feb 2021 12:30:14 +0100 (CET) Received: by mail-wr1-f53.google.com with SMTP id 7so7367105wrz.0 for ; Fri, 05 Feb 2021 03:30:14 -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=KUFEg+9lLokXz67lwtpQ/2a9CnE0DLo/6Ibjcu7C7fg=; b=TaFB+Mkg2KYh/sS93Jscg6nNuuI6XuO5qxw8oBEY734bDBSikb1D/hjMk6IQ+6Cxyp d1BlXBfLssdC8g+wotK91z6MdK9+WontP1p48d0tZ/nuEhpjL1CVye2yw7HXNRMJVsWv J+tyXP+53YtUorFNj5mH/b5an4cYVFRSXHUkhcvsRvWR9AU07PwOjheQwFzYr3KDHbzW 1pk0vvnFX818SYZSwU2WbMmJA0EUzwL8c2NwNQ2WXNWp3l6g4/t2J2b0klw4MRfXCGMY nPHYih4DlyVlbIaooq/tkZjbxHI/i/Yr9ZlEp0oyL8D/wHa/UhmHaXqCwCaPJul2/Ul0 3VLg== 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=KUFEg+9lLokXz67lwtpQ/2a9CnE0DLo/6Ibjcu7C7fg=; b=tzeefSak1dCjaKS8L30mk33HRxOsmQw6AqMSlnnIk2Vg7RUeKkjVzFQ51WXkzbHzOR VYKwvpuIh8Jh1swlXCVI5JPlSeu7B/bCXSqEUS6TBUpKzd5TPcRoOgf8Qb9exJSaYooN 6j67ECupOquAzKV+L4H7K077zErUimdGlkp5oKHPsc8LBX2ZI0BNvCmHKJv00AtOVEkJ a6tZ2Qbs311mDVh1fT8LLq7Spl4IKMg4/DGdQy5phHDEjMl7BIU4b2pcxsBeYqLhy94Z r8KXXbc8V/dpZgbaFjc+TiJaG2Bz7RtuszDdoAkGUde7Wu1iMhDSrO39n6eEjSyk/vJY g/kg== X-Gm-Message-State: AOAM5312TYwmEibpYxzyAuEN9YFF+0MV21seB0xCLbqWbxxmVvuYn0j7 4R6ceacrH1sKHIyderWLMGM= X-Google-Smtp-Source: ABdhPJwqlVP+U5lk78gq9x27nvlVssMiNVGojW+Z5cJ/Cl4x9xzjZSsTqJokKYBALnIfK73Vdie4qw== X-Received: by 2002:adf:92a6:: with SMTP id 35mr4536027wrn.193.1612524613952; Fri, 05 Feb 2021 03:30:13 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id l14sm12060846wrq.87.2021.02.05.03.30.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:30:13 -0800 (PST) From: luca.boccassi@gmail.com To: Ruifeng Wang Cc: Jerin Jacob , dpdk stable Date: Fri, 5 Feb 2021 11:16:23 +0000 Message-Id: <20210205111920.1272063-97-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-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'common/octeontx2: fix build with SVE' 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/4d2a3f2dff4e59f747df9ad934c1c0a223017371 Thanks. Luca Boccassi --- >From 4d2a3f2dff4e59f747df9ad934c1c0a223017371 Mon Sep 17 00:00:00 2001 From: Ruifeng Wang Date: Tue, 12 Jan 2021 02:57:07 +0000 Subject: [PATCH] common/octeontx2: fix build with SVE [ upstream commit fe558028140662ba8488399714d8fe21281851f0 ] Building with gcc 10.2 with SVE extension enabled got error: {standard input}: Assembler messages: {standard input}:4002: Error: selected processor does not support `mov z3.b,#0' {standard input}:4003: Error: selected processor does not support `whilelo p1.b,xzr,x7' {standard input}:4005: Error: selected processor does not support `ld1b z0.b,p1/z,[x8]' {standard input}:4006: Error: selected processor does not support `whilelo p4.s,wzr,w7' This is because inline assembly code explicitly resets cpu model to not have SVE support. Thus SVE instructions generated by compiler auto vectorization got rejected by assembler. Added SVE to the cpu model specified by inline assembly for SVE support. Not replacing the inline assembly with C atomics because the driver relies on specific LSE instruction to interface to co-processor [1]. Fixes: 8a4f835971f5 ("common/octeontx2: add IO handling APIs") [1] https://mails.dpdk.org/archives/dev/2021-January/196092.html Signed-off-by: Ruifeng Wang Reviewed-by: Jerin Jacob --- drivers/common/octeontx2/otx2_io_arm64.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/common/octeontx2/otx2_io_arm64.h b/drivers/common/octeontx2/otx2_io_arm64.h index b5c85d9a6e..34268e3af3 100644 --- a/drivers/common/octeontx2/otx2_io_arm64.h +++ b/drivers/common/octeontx2/otx2_io_arm64.h @@ -21,6 +21,12 @@ #define otx2_prefetch_store_keep(ptr) ({\ asm volatile("prfm pstl1keep, [%x0]\n" : : "r" (ptr)); }) +#if defined(__ARM_FEATURE_SVE) +#define __LSE_PREAMBLE " .cpu generic+lse+sve\n" +#else +#define __LSE_PREAMBLE " .cpu generic+lse\n" +#endif + static __rte_always_inline uint64_t otx2_atomic64_add_nosync(int64_t incr, int64_t *ptr) { @@ -28,7 +34,7 @@ otx2_atomic64_add_nosync(int64_t incr, int64_t *ptr) /* Atomic add with no ordering */ asm volatile ( - ".cpu generic+lse\n" + __LSE_PREAMBLE "ldadd %x[i], %x[r], [%[b]]" : [r] "=r" (result), "+m" (*ptr) : [i] "r" (incr), [b] "r" (ptr) @@ -43,7 +49,7 @@ otx2_atomic64_add_sync(int64_t incr, int64_t *ptr) /* Atomic add with ordering */ asm volatile ( - ".cpu generic+lse\n" + __LSE_PREAMBLE "ldadda %x[i], %x[r], [%[b]]" : [r] "=r" (result), "+m" (*ptr) : [i] "r" (incr), [b] "r" (ptr) @@ -57,7 +63,7 @@ otx2_lmt_submit(rte_iova_t io_address) uint64_t result; asm volatile ( - ".cpu generic+lse\n" + __LSE_PREAMBLE "ldeor xzr,%x[rf],[%[rs]]" : [rf] "=r"(result): [rs] "r"(io_address)); return result; @@ -69,7 +75,7 @@ otx2_lmt_submit_release(rte_iova_t io_address) uint64_t result; asm volatile ( - ".cpu generic+lse\n" + __LSE_PREAMBLE "ldeorl xzr,%x[rf],[%[rs]]" : [rf] "=r"(result) : [rs] "r"(io_address)); return result; @@ -104,4 +110,5 @@ otx2_lmt_mov_seg(void *out, const void *in, const uint16_t segdw) dst128[i] = src128[i]; } +#undef __LSE_PREAMBLE #endif /* _OTX2_IO_ARM64_H_ */ -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:33.618118057 +0000 +++ 0097-common-octeontx2-fix-build-with-SVE.patch 2021-02-05 11:18:28.946693778 +0000 @@ -1 +1 @@ -From fe558028140662ba8488399714d8fe21281851f0 Mon Sep 17 00:00:00 2001 +From 4d2a3f2dff4e59f747df9ad934c1c0a223017371 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit fe558028140662ba8488399714d8fe21281851f0 ] + @@ -23 +24,0 @@ -Cc: stable@dpdk.org