From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw0-f180.google.com (mail-yw0-f180.google.com [209.85.161.180]) by dpdk.org (Postfix) with ESMTP id 131665680 for ; Thu, 29 Sep 2016 15:06:13 +0200 (CEST) Received: by mail-yw0-f180.google.com with SMTP id t67so48030685ywg.3 for ; Thu, 29 Sep 2016 06:06:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=mqSMw8bzvFuczn7kg1bnKI4GkqcRg3N0tv7ZL/iDKAo=; b=pl551maf3eyQO7wD1mGSh1RCdCp/tJ7qTtIR8WwcfiWLYT2HJNQzYrheuMOW2ojrxk tK7WeQC/6izzq6fHthP1PyhxE6pgHSutHLTstVtan8LsI6zlWQFyU7F2ebU/LBBSiteA tqktuMzzWv65/Trp45sJ2RongRAEgganXmjGhTHfE6wBdsZCBFDzu67kKr8etKn6AUHg oFIhr20NalwxOCQdyK+lWRoR0V2AmxVl7K/5cvV1Vr45Ub5AnluSWaBW/sSS7JS7rxr5 ua5q6lvQqBYUM/1ZpeNd4FLoJgPNTbCShksnMBZs9wr6hWhoMzOXJXev2swU4+rk85Co BABA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mqSMw8bzvFuczn7kg1bnKI4GkqcRg3N0tv7ZL/iDKAo=; b=lJ6oJuLe8eQPzmOT3L/HjkKwtYyikUBYTpBUy6YedF7oYiYBLAqhA9QeQ8YZAwfw4Z KkNOglbQidCqbNPzAFjrVM+5wrvKkjmHn6/F3Q+2QKqx1UZx/47HOlV56qlXnOxU9/UL a8NjcUtoOv/4h90LKDAuPvn8cs/C0rjJ3CYi1EMXorrTpjy+qOizMSZ8L4jl7M3HhEEI t0b3AJ4TwsD1fWZgfDxKvphLoBZuYqCyfDH6gNf0z5Joygl53dC31Wc6P1lotUjm06gi x1JhLUYxkJOY2fUyN6CaeaZJJL9UnWgUEjkG0oMqVhzNNLTNax81ZP5QguCsZGCLD7H/ G9EQ== X-Gm-Message-State: AA6/9Rl2ZZRYkjTvPjNEI510eCrDXm6Oll8EJuCJRzZYkinBV3JFN5nnDDwaA9lua3gc2iRGBtaPxgmwaOX2yFVP X-Received: by 10.129.152.142 with SMTP id p136mr867195ywg.207.1475154372427; Thu, 29 Sep 2016 06:06:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.119.196 with HTTP; Thu, 29 Sep 2016 06:05:42 -0700 (PDT) In-Reply-To: <1475184293-18298-1-git-send-email-nikhil.rao@intel.com> References: <1475184293-18298-1-git-send-email-nikhil.rao@intel.com> From: Christian Ehrhardt Date: Thu, 29 Sep 2016 15:05:42 +0200 Message-ID: To: stable@dpdk.org Cc: dev , Nikhil Rao Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] eal: fix bug in x86 cmpset X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 13:06:13 -0000 The patch misses a fixed: line which it should get I think. But in general If applied -> stable for this one? On Thu, Sep 29, 2016 at 11:24 PM, Nikhil Rao wrote: > The original code used movl instead of xchgl, this caused > rte_atomic64_cmpset to use ebx as the lower dword of the source > to cmpxchg8b instead of the lower dword of function argument "src". > > Reported-by: Job Abraham > Tested-by: Job Abraham > Signed-off-by: Nikhil Rao > --- > lib/librte_eal/common/include/arch/x86/rte_atomic_32.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_eal/common/include/arch/x86/rte_atomic_32.h > b/lib/librte_eal/common/include/arch/x86/rte_atomic_32.h > index 2e04c75..fb3abf1 100644 > --- a/lib/librte_eal/common/include/arch/x86/rte_atomic_32.h > +++ b/lib/librte_eal/common/include/arch/x86/rte_atomic_32.h > @@ -81,7 +81,7 @@ rte_atomic64_cmpset(volatile uint64_t *dst, uint64_t > exp, uint64_t src) > : "memory" ); /* no-clobber list */ > #else > asm volatile ( > - "mov %%ebx, %%edi\n" > + "xchgl %%ebx, %%edi;\n" > MPLOCKED > "cmpxchg8b (%[dst]);" > "setz %[res];" > -- > 2.7.4 > > -- Christian Ehrhardt Software Engineer, Ubuntu Server Canonical Ltd