Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752173AbbKKA0H (ORCPT ); Tue, 10 Nov 2015 19:26:07 -0500 Received: from mail-pa0-f53.google.com ([209.85.220.53]:33884 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751398AbbKKA0F (ORCPT ); Tue, 10 Nov 2015 19:26:05 -0500 Message-ID: <56428B1A.5090303@linaro.org> Date: Tue, 10 Nov 2015 16:26:02 -0800 From: "Shi, Yang" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Eric Dumazet CC: ast@kernel.org, daniel@iogearbox.net, catalin.marinas@arm.com, will.deacon@arm.com, zlim.lnx@gmail.com, xi.wang@gmail.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org Subject: Re: [PATCH 2/2] arm64: bpf: add BPF XADD instruction References: <1447195301-16757-1-git-send-email-yang.shi@linaro.org> <1447195301-16757-3-git-send-email-yang.shi@linaro.org> <1447200535.17135.88.camel@edumazet-glaptop2.roam.corp.google.com> In-Reply-To: <1447200535.17135.88.camel@edumazet-glaptop2.roam.corp.google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 783 Lines: 28 On 11/10/2015 4:08 PM, Eric Dumazet wrote: > On Tue, 2015-11-10 at 14:41 -0800, Yang Shi wrote: >> aarch64 doesn't have native support for XADD instruction, implement it by >> the below instruction sequence: >> >> Load (dst + off) to a register >> Add src to it >> Store it back to (dst + off) > > Not really what is needed ? > > See this BPF_XADD as an atomic_add() equivalent. I see. Thanks. The documentation doesn't say too much about "exclusive" add. If so it should need load-acquire/store-release. I will rework it. Yang > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/