From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0ABD0C433EF for ; Fri, 11 Feb 2022 14:41:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZXR8414pjcs+/WQ08doLcLzFXzOgK+ySwjw5GSIVnK8=; b=Ra7BtAbGhrXHAnvCZSm5z9QDuT Pc8H9ZE9Q8J4LgDy90KPlflfr7n+0AvE8rTr7gT/n3P2qA+9WtM4ZUTEZyr7gaTHxgd4pKwDFbTXL k1wBIiTTU4YN/zmyUnFxE73C1Xewio+37JUSl6a2ZIka6fJg4FKgoCxLqzZmVluwKw2NMxQoX+tT4 6wx4Cs9txKhLKlnT0B/9pZxGPCt2bIggshR/KKyhh/jtw0YHDHLSi4ltC8Jaoro3bkhoRpKruN/84 Z9zEpudwso0l3/QwDbAz+ZaDkh+pkth05DoAuw9EsjG9n0ztxEcOPvmEhHyzpCIe0CZ7QT+10wMib ZzFfHpfw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nIX5q-007ctg-5p; Fri, 11 Feb 2022 14:40:14 +0000 Received: from www62.your-server.de ([213.133.104.62]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nIX5n-007crY-5N for linux-arm-kernel@lists.infradead.org; Fri, 11 Feb 2022 14:40:12 +0000 Received: from sslproxy03.your-server.de ([88.198.220.132]) by www62.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1nIX5R-00064w-Rf; Fri, 11 Feb 2022 15:39:49 +0100 Received: from [85.1.206.226] (helo=linux.home) by sslproxy03.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nIX5R-0009z4-Dh; Fri, 11 Feb 2022 15:39:49 +0100 Subject: Re: [PATCH bpf-next v3 2/4] arm64: insn: add encoders for atomic operations To: Hou Tao , Alexei Starovoitov , Mark Rutland Cc: Martin KaFai Lau , Yonghong Song , Andrii Nakryiko , Song Liu , "David S . Miller" , John Fastabend , netdev@vger.kernel.org, bpf@vger.kernel.org, Zi Shen Lim , Catalin Marinas , Will Deacon , Julien Thierry , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org References: <20220129220452.194585-1-houtao1@huawei.com> <20220129220452.194585-3-houtao1@huawei.com> From: Daniel Borkmann Message-ID: <4524da71-3977-07db-bd6e-cebd1c539805@iogearbox.net> Date: Fri, 11 Feb 2022 15:39:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20220129220452.194585-3-houtao1@huawei.com> Content-Language: en-US X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.103.5/26450/Fri Feb 11 10:24:09 2022) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220211_064011_214673_C3611019 X-CRM114-Status: GOOD ( 15.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 1/29/22 11:04 PM, Hou Tao wrote: > It is a preparation patch for eBPF atomic supports under arm64. eBPF > needs support atomic[64]_fetch_add, atomic[64]_[fetch_]{and,or,xor} and > atomic[64]_{xchg|cmpxchg}. The ordering semantics of eBPF atomics are > the same with the implementations in linux kernel. > > Add three helpers to support LDCLR/LDEOR/LDSET/SWP, CAS and DMB > instructions. STADD/STCLR/STEOR/STSET are simply encoded as aliases for > LDADD/LDCLR/LDEOR/LDSET with XZR as the destination register, so no extra > helper is added. atomic_fetch_add() and other atomic ops needs support for > STLXR instruction, so extend enum aarch64_insn_ldst_type to do that. > > LDADD/LDEOR/LDSET/SWP and CAS instructions are only available when LSE > atomics is enabled, so just return AARCH64_BREAK_FAULT directly in > these newly-added helpers if CONFIG_ARM64_LSE_ATOMICS is disabled. > > Signed-off-by: Hou Tao Hey Mark / Ard / Will / Catalin or others, could we get an Ack on patch 1 & 2 at min if it looks good to you? Thanks a lot, Daniel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel