1 From: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
3 This patch fixes the compilation problem with rte_smp_mb,
4 when there is else clause following it, as in test_barrier.c.
6 Fixes: 05c3fd7110 ("eal/ppc: atomic operations for IBM Power")
9 Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
10 Acked-by: Luca Boccassi <bluca@debian.org>
11 Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
14 lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
17 Forwarded: yes (http://dpdk.org/dev/patchwork/patch/35493/)
18 Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
19 Original-Author: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
20 Origin: upstream, http://dpdk.org/dev/patchwork/patch/35493/
21 Last-Update: 2018-03-13
22 diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h b/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
23 index 39fce7b..1821774 100644
24 --- a/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
25 +++ b/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
27 * Guarantees that the LOAD and STORE operations generated before the
28 * barrier occur before the LOAD and STORE operations generated after.
30 -#define rte_mb() {asm volatile("sync" : : : "memory"); }
31 +#define rte_mb() asm volatile("sync" : : : "memory")
34 * Write memory barrier.