[dpdk-stable] patch 'eal/x86: fix atomic cmpset' has been queued to stable release 17.08.1

Yuanhan Liu yliu at fridaylinux.org
Tue Nov 21 14:18:28 CET 2017


Hi,

FYI, your patch has been queued to stable release 17.08.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 11/24/17. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 9778ba324d3cee8f14bbc008a43b8df7dfee4392 Mon Sep 17 00:00:00 2001
From: Nikhil Rao <nikhil.rao at intel.com>
Date: Fri, 30 Sep 2016 02:54:53 +0530
Subject: [PATCH] eal/x86: fix atomic cmpset

[ upstream commit 9d1c2a6a912bebde1139157b950e39ffa7192c9d ]

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".

Fixes: af75078fece3 ("first public release")

Reported-by: Job Abraham <job.abraham at intel.com>
Signed-off-by: Nikhil Rao <nikhil.rao at intel.com>
Tested-by: Job Abraham <job.abraham at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 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



More information about the stable mailing list