Skip to content

Commit

Permalink
bus/fslmc: remove conflicting memory barrier macro
Browse files Browse the repository at this point in the history
[ upstream commit 24ffb8c ]

There are two definitions conflicting each other, for more
details, refer to [1].

include/rte_atomic_64.h:19: error: "dmb" redefined [-Werror]
drivers/bus/fslmc/mc/fsl_mc_sys.h:36: note: this is the location of the
previous definition
 #define dmb() {__asm__ __volatile__("" : : : "memory"); }

The fix is to reuse the EAL definition to avoid conflicts.

[1] http://inbox.dpdk.org/users/VI1PR08MB537631AB25F41B8880DCCA988FDF0@
VI1PR08MB5376.eurprd08.prod.outlook.com/T/#u

Fixes: 3af733b ("bus/fslmc: introduce MC object functions")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
  • Loading branch information
GavinHu-Arm authored and kevintraynor committed Feb 7, 2020
1 parent 1caa603 commit c6f92f3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/bus/fslmc/mc/fsl_mc_sys.h
Expand Up @@ -32,11 +32,10 @@ struct fsl_mc_io {
#include <sys/uio.h>
#include <linux/byteorder/little_endian.h>

#ifndef dmb
#define dmb() {__asm__ __volatile__("" : : : "memory"); }
#endif
#define __iormb() dmb()
#define __iowmb() dmb()
#include <rte_atomic.h>

#define __iormb() rte_io_rmb()
#define __iowmb() rte_io_wmb()
#define __arch_getq(a) (*(volatile uint64_t *)(a))
#define __arch_putq(v, a) (*(volatile uint64_t *)(a) = (v))
#define __arch_putq32(v, a) (*(volatile uint32_t *)(a) = (v))
Expand Down

0 comments on commit c6f92f3

Please sign in to comment.