5b974784125dd2de79164d0d2b5445ab81309d09
[deb_dpdk.git] / debian / patches / dpdk-dev-eal-ppc-fix-rte_smp_mb-for-a-compilation-error-with-else-clause.patch
1 From: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
2
3 This patch fixes the compilation problem with rte_smp_mb,
4 when there is else clause following it, as in test_barrier.c.
5
6 Fixes: 05c3fd7110 ("eal/ppc: atomic operations for IBM Power")
7 Cc: stable@dpdk.org
8
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>
12
13 ---
14  lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h | 2 +-
15  1 file changed, 1 insertion(+), 1 deletion(-)
16
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
26 @@ -55,7 +55,7 @@
27   * Guarantees that the LOAD and STORE operations generated before the
28   * barrier occur before the LOAD and STORE operations generated after.
29   */
30 -#define        rte_mb()  {asm volatile("sync" : : : "memory"); }
31 +#define        rte_mb()  asm volatile("sync" : : : "memory")
32  
33  /**
34   * Write memory barrier.