[dpdk-stable] [dpdk-dev] [PATCH v7 1/7] bus/fslmc: fix the conflicting dmb function

David Marchand david.marchand at redhat.com
Thu Oct 17 17:06:43 CEST 2019


On Fri, Sep 27, 2019 at 7:42 AM Gavin Hu <gavin.hu at arm.com> wrote:
>
> 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"); }

Interesting, this means that we have a leftover macro from the arm
header that can pollute the namespace.

Anyway, this driver is not using the memory barrier api from the EAL.

How about simply fixing with?
#define __iormb()      rte_io_rmb()
#define __iowmb()      rte_io_wmb()

>
> The fix is to include the spinlock.h file before the other header files,
> this is inline with the coding style[2] about the "header includes".
> The fix changes the function to take the argument for arm to be
> meaningful.
>
> [1] http://inbox.dpdk.org/users/VI1PR08MB537631AB25F41B8880DCCA988FDF0@i
> VI1PR08MB5376.eurprd08.prod.outlook.com/T/#u

This url is broken, there is a trailing i on the first line.

> [2] https://doc.dpdk.org/guides/contributing/coding_style.html
>
> Fixes: 3af733ba8da8 ("bus/fslmc: introduce MC object functions")
> Cc: stable at dpdk.org
>
> Signed-off-by: Gavin Hu <gavin.hu at arm.com>
> Reviewed-by: Phil Yang <phi.yang at arm.com>



-- 
David Marchand



More information about the stable mailing list