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 243FDC433F5 for ; Fri, 28 Jan 2022 09:19:59 +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-Transfer-Encoding:Content-Type: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=gafyPdp1c/JFoOaRFfJ/zZqmARyefO0tJj3UjcwDAjw=; b=B6Om2ivnDM6OAN4V8XzEoTqRrS 3qcwTfzZn/xaEJFrFoEXWfoPbNC6fT7T4EFKIEE8YZv202EEz0nFF1//D5I8pL81yO6ji5RLOEiUe ZebPnDBxvHVxQIKiDpLAM09o7IlD5Jpgp2b5rj7zFzdPJvwmDwu0Lvp6UMNtm9EjCvt40fvPV6x2z K4B1jG7KURVduXWByRCciWJ3bLN1lhG0F7XZlDF3UrmiEMR5EL5wwy8fCDS+OQ4iy5SWz0JSROJCZ 6vhbUUj1ehCQm/jHQPhn1aCZEWmHb0mBhwzs5hHcDmD1Upm63CxfpzdKs538JgzAq61bieJ30f1wG 59vQVj9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDNP5-001CG1-68; Fri, 28 Jan 2022 09:18:47 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDNOz-001CCh-LT for linux-arm-kernel@lists.infradead.org; Fri, 28 Jan 2022 09:18:43 +0000 Received: from dggpeml500025.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4JlX144YdYzcctP; Fri, 28 Jan 2022 17:17:44 +0800 (CST) Received: from [10.174.176.117] (10.174.176.117) by dggpeml500025.china.huawei.com (7.185.36.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 28 Jan 2022 17:18:35 +0800 Subject: Re: [PATCH bpf-next 2/2] arm64, bpf: support more atomic operations To: John Fastabend , Alexei Starovoitov CC: Martin KaFai Lau , Yonghong Song , Daniel Borkmann , Andrii Nakryiko , Song Liu , "David S . Miller" , , , Zi Shen Lim , Catalin Marinas , Will Deacon , Julien Thierry , Mark Rutland , Ard Biesheuvel , References: <20220121135632.136976-1-houtao1@huawei.com> <20220121135632.136976-3-houtao1@huawei.com> <61f23655411bc_57f032084@john.notmuch> <8b67fa3d-f83c-85a5-5159-70b0f913833a@huawei.com> <61f35869ba5a_738dc20823@john.notmuch> From: Hou Tao Message-ID: Date: Fri, 28 Jan 2022 17:18:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <61f35869ba5a_738dc20823@john.notmuch> Content-Language: en-US X-Originating-IP: [10.174.176.117] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500025.china.huawei.com (7.185.36.35) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220128_011841_935547_6A5F061B X-CRM114-Status: GOOD ( 11.79 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On 1/28/2022 10:43 AM, John Fastabend wrote: > Hou Tao wrote: >> Hi, >> >> On 1/27/2022 2:06 PM, John Fastabend wrote: >>> Hou Tao wrote: >>>> Atomics for eBPF patch series adds support for atomic[64]_fetch_add, >>>> atomic[64]_[fetch_]{and,or,xor} and atomic[64]_{xchg|cmpxchg}, but >>>> it only add support for x86-64, so support these atomic operations >>>> for arm64 as well. snip >>>> + >>>> + switch (insn->imm) { >>> Diff'ing X86 implementation which has a BPF_SUB case how is it avoided >>> here? >> I think it is just left over from patchset [1], because according to the LLVM >> commit [2] >> __sync_fetch_and_sub(&addr, value) is implemented by __sync_fetch_and_add(&addr, >> -value). >> I will post a patch to remove it. > OK in that case LGTM with the caveat not an ARM expert. > > Acked-by: John Fastabend Thanks for your Acked-by. Regards, Tao _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel