patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v4 1/6] bus/fslmc: fix the conflicting dmb function
       [not found] ` <1561911676-37718-1-git-send-email-gavin.hu@arm.com>
@ 2019-08-22  6:12   ` Gavin Hu
  2019-09-12 11:24   ` [dpdk-stable] [PATCH v5 2/8] " Gavin Hu
                     ` (8 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Gavin Hu @ 2019-08-22  6:12 UTC (permalink / raw)
  To: dev
  Cc: nd, thomas, stephen, jerinj, pbhagavatula, Honnappa.Nagarahalli, stable

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 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
[2] https://doc.dpdk.org/guides/contributing/coding_style.html

Fixes: 3af733ba8da8 ("bus/fslmc: introduce MC object functions")
Cc: stable@dpdk.org

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phi.yang@arm.com>
---
 drivers/bus/fslmc/mc/fsl_mc_sys.h | 10 +++++++---
 drivers/bus/fslmc/mc/mc_sys.c     |  3 +--
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/bus/fslmc/mc/fsl_mc_sys.h b/drivers/bus/fslmc/mc/fsl_mc_sys.h
index d0c7b39..fe9dc95 100644
--- a/drivers/bus/fslmc/mc/fsl_mc_sys.h
+++ b/drivers/bus/fslmc/mc/fsl_mc_sys.h
@@ -33,10 +33,14 @@ struct fsl_mc_io {
 #include <linux/byteorder/little_endian.h>
 
 #ifndef dmb
-#define dmb() {__asm__ __volatile__("" : : : "memory"); }
+#ifdef RTE_ARCH_ARM64
+#define dmb(opt) {asm volatile("dmb " #opt : : : "memory"); }
+#else
+#define dmb(opt)
 #endif
-#define __iormb()	dmb()
-#define __iowmb()	dmb()
+#endif
+#define __iormb()	dmb(ld)
+#define __iowmb()	dmb(st)
 #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))
diff --git a/drivers/bus/fslmc/mc/mc_sys.c b/drivers/bus/fslmc/mc/mc_sys.c
index efafdc3..22143ef 100644
--- a/drivers/bus/fslmc/mc/mc_sys.c
+++ b/drivers/bus/fslmc/mc/mc_sys.c
@@ -4,11 +4,10 @@
  * Copyright 2017 NXP
  *
  */
+#include <rte_spinlock.h>
 #include <fsl_mc_sys.h>
 #include <fsl_mc_cmd.h>
 
-#include <rte_spinlock.h>
-
 /** User space framework uses MC Portal in shared mode. Following change
  * introduces lock in MC FLIB
  */
-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-stable] [PATCH v5 2/8] bus/fslmc: fix the conflicting dmb function
       [not found] ` <1561911676-37718-1-git-send-email-gavin.hu@arm.com>
  2019-08-22  6:12   ` [dpdk-stable] [PATCH v4 1/6] bus/fslmc: fix the conflicting dmb function Gavin Hu
@ 2019-09-12 11:24   ` Gavin Hu
  2019-09-14 14:59   ` [dpdk-stable] [PATCH v6 1/7] " Gavin Hu
                     ` (7 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Gavin Hu @ 2019-09-12 11:24 UTC (permalink / raw)
  To: dev
  Cc: nd, thomas, stephen, hemant.agrawal, jerinj, pbhagavatula,
	Honnappa.Nagarahalli, stable

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 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
[2] https://doc.dpdk.org/guides/contributing/coding_style.html

Fixes: 3af733ba8da8 ("bus/fslmc: introduce MC object functions")
Cc: stable@dpdk.org

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phi.yang@arm.com>
---
 drivers/bus/fslmc/mc/fsl_mc_sys.h | 10 +++++++---
 drivers/bus/fslmc/mc/mc_sys.c     |  3 +--
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/bus/fslmc/mc/fsl_mc_sys.h b/drivers/bus/fslmc/mc/fsl_mc_sys.h
index d0c7b39..fe9dc95 100644
--- a/drivers/bus/fslmc/mc/fsl_mc_sys.h
+++ b/drivers/bus/fslmc/mc/fsl_mc_sys.h
@@ -33,10 +33,14 @@ struct fsl_mc_io {
 #include <linux/byteorder/little_endian.h>
 
 #ifndef dmb
-#define dmb() {__asm__ __volatile__("" : : : "memory"); }
+#ifdef RTE_ARCH_ARM64
+#define dmb(opt) {asm volatile("dmb " #opt : : : "memory"); }
+#else
+#define dmb(opt)
 #endif
-#define __iormb()	dmb()
-#define __iowmb()	dmb()
+#endif
+#define __iormb()	dmb(ld)
+#define __iowmb()	dmb(st)
 #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))
diff --git a/drivers/bus/fslmc/mc/mc_sys.c b/drivers/bus/fslmc/mc/mc_sys.c
index efafdc3..22143ef 100644
--- a/drivers/bus/fslmc/mc/mc_sys.c
+++ b/drivers/bus/fslmc/mc/mc_sys.c
@@ -4,11 +4,10 @@
  * Copyright 2017 NXP
  *
  */
+#include <rte_spinlock.h>
 #include <fsl_mc_sys.h>
 #include <fsl_mc_cmd.h>
 
-#include <rte_spinlock.h>
-
 /** User space framework uses MC Portal in shared mode. Following change
  * introduces lock in MC FLIB
  */
-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-stable] [PATCH v6 1/7] bus/fslmc: fix the conflicting dmb function
       [not found] ` <1561911676-37718-1-git-send-email-gavin.hu@arm.com>
  2019-08-22  6:12   ` [dpdk-stable] [PATCH v4 1/6] bus/fslmc: fix the conflicting dmb function Gavin Hu
  2019-09-12 11:24   ` [dpdk-stable] [PATCH v5 2/8] " Gavin Hu
@ 2019-09-14 14:59   ` Gavin Hu
  2019-09-27  5:41   ` [dpdk-stable] [PATCH v7 " Gavin Hu
                     ` (6 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Gavin Hu @ 2019-09-14 14:59 UTC (permalink / raw)
  To: dev
  Cc: nd, thomas, stephen, hemant.agrawal, jerinj, pbhagavatula,
	Honnappa.Nagarahalli, ruifeng.wang, phil.yang, steve.capper,
	stable

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 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
[2] https://doc.dpdk.org/guides/contributing/coding_style.html

Fixes: 3af733ba8da8 ("bus/fslmc: introduce MC object functions")
Cc: stable@dpdk.org

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phi.yang@arm.com>
---
 drivers/bus/fslmc/mc/fsl_mc_sys.h | 10 +++++++---
 drivers/bus/fslmc/mc/mc_sys.c     |  3 +--
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/bus/fslmc/mc/fsl_mc_sys.h b/drivers/bus/fslmc/mc/fsl_mc_sys.h
index d0c7b39..fe9dc95 100644
--- a/drivers/bus/fslmc/mc/fsl_mc_sys.h
+++ b/drivers/bus/fslmc/mc/fsl_mc_sys.h
@@ -33,10 +33,14 @@ struct fsl_mc_io {
 #include <linux/byteorder/little_endian.h>
 
 #ifndef dmb
-#define dmb() {__asm__ __volatile__("" : : : "memory"); }
+#ifdef RTE_ARCH_ARM64
+#define dmb(opt) {asm volatile("dmb " #opt : : : "memory"); }
+#else
+#define dmb(opt)
 #endif
-#define __iormb()	dmb()
-#define __iowmb()	dmb()
+#endif
+#define __iormb()	dmb(ld)
+#define __iowmb()	dmb(st)
 #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))
diff --git a/drivers/bus/fslmc/mc/mc_sys.c b/drivers/bus/fslmc/mc/mc_sys.c
index efafdc3..22143ef 100644
--- a/drivers/bus/fslmc/mc/mc_sys.c
+++ b/drivers/bus/fslmc/mc/mc_sys.c
@@ -4,11 +4,10 @@
  * Copyright 2017 NXP
  *
  */
+#include <rte_spinlock.h>
 #include <fsl_mc_sys.h>
 #include <fsl_mc_cmd.h>
 
-#include <rte_spinlock.h>
-
 /** User space framework uses MC Portal in shared mode. Following change
  * introduces lock in MC FLIB
  */
-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-stable] [PATCH v7 1/7] bus/fslmc: fix the conflicting dmb function
       [not found] ` <1561911676-37718-1-git-send-email-gavin.hu@arm.com>
                     ` (2 preceding siblings ...)
  2019-09-14 14:59   ` [dpdk-stable] [PATCH v6 1/7] " Gavin Hu
@ 2019-09-27  5:41   ` Gavin Hu
  2019-09-27  8:24     ` Hemant Agrawal
  2019-10-17 15:06     ` [dpdk-stable] [dpdk-dev] " David Marchand
  2019-10-21  9:47   ` [dpdk-stable] [PATCH v8 1/6] " Gavin Hu
                     ` (5 subsequent siblings)
  9 siblings, 2 replies; 14+ messages in thread
From: Gavin Hu @ 2019-09-27  5:41 UTC (permalink / raw)
  To: dev
  Cc: nd, thomas, stephen, hemant.agrawal, jerinj, pbhagavatula,
	Honnappa.Nagarahalli, ruifeng.wang, phil.yang, steve.capper,
	stable

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 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
[2] https://doc.dpdk.org/guides/contributing/coding_style.html

Fixes: 3af733ba8da8 ("bus/fslmc: introduce MC object functions")
Cc: stable@dpdk.org

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phi.yang@arm.com>
---
 drivers/bus/fslmc/mc/fsl_mc_sys.h | 10 +++++++---
 drivers/bus/fslmc/mc/mc_sys.c     |  3 +--
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/bus/fslmc/mc/fsl_mc_sys.h b/drivers/bus/fslmc/mc/fsl_mc_sys.h
index d0c7b39..fe9dc95 100644
--- a/drivers/bus/fslmc/mc/fsl_mc_sys.h
+++ b/drivers/bus/fslmc/mc/fsl_mc_sys.h
@@ -33,10 +33,14 @@ struct fsl_mc_io {
 #include <linux/byteorder/little_endian.h>
 
 #ifndef dmb
-#define dmb() {__asm__ __volatile__("" : : : "memory"); }
+#ifdef RTE_ARCH_ARM64
+#define dmb(opt) {asm volatile("dmb " #opt : : : "memory"); }
+#else
+#define dmb(opt)
 #endif
-#define __iormb()	dmb()
-#define __iowmb()	dmb()
+#endif
+#define __iormb()	dmb(ld)
+#define __iowmb()	dmb(st)
 #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))
diff --git a/drivers/bus/fslmc/mc/mc_sys.c b/drivers/bus/fslmc/mc/mc_sys.c
index efafdc3..22143ef 100644
--- a/drivers/bus/fslmc/mc/mc_sys.c
+++ b/drivers/bus/fslmc/mc/mc_sys.c
@@ -4,11 +4,10 @@
  * Copyright 2017 NXP
  *
  */
+#include <rte_spinlock.h>
 #include <fsl_mc_sys.h>
 #include <fsl_mc_cmd.h>
 
-#include <rte_spinlock.h>
-
 /** User space framework uses MC Portal in shared mode. Following change
  * introduces lock in MC FLIB
  */
-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-stable] [PATCH v7 1/7] bus/fslmc: fix the conflicting dmb function
  2019-09-27  5:41   ` [dpdk-stable] [PATCH v7 " Gavin Hu
@ 2019-09-27  8:24     ` Hemant Agrawal
  2019-10-17 15:06     ` [dpdk-stable] [dpdk-dev] " David Marchand
  1 sibling, 0 replies; 14+ messages in thread
From: Hemant Agrawal @ 2019-09-27  8:24 UTC (permalink / raw)
  To: Gavin Hu, dev
  Cc: nd, thomas, stephen, jerinj, pbhagavatula, Honnappa.Nagarahalli,
	ruifeng.wang, phil.yang, steve.capper, stable

Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v7 1/7] bus/fslmc: fix the conflicting dmb function
  2019-09-27  5:41   ` [dpdk-stable] [PATCH v7 " Gavin Hu
  2019-09-27  8:24     ` Hemant Agrawal
@ 2019-10-17 15:06     ` David Marchand
  1 sibling, 0 replies; 14+ messages in thread
From: David Marchand @ 2019-10-17 15:06 UTC (permalink / raw)
  To: Gavin Hu
  Cc: dev, nd, Thomas Monjalon, Stephen Hemminger, Hemant Agrawal,
	Jerin Jacob Kollanukkaran, Pavan Nikhilesh, Honnappa Nagarahalli,
	Ruifeng Wang (Arm Technology China),
	Phil Yang, Steve Capper, dpdk stable

On Fri, Sep 27, 2019 at 7:42 AM Gavin Hu <gavin.hu@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@dpdk.org
>
> Signed-off-by: Gavin Hu <gavin.hu@arm.com>
> Reviewed-by: Phil Yang <phi.yang@arm.com>



-- 
David Marchand


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-stable] [PATCH v8 1/6] bus/fslmc: fix the conflicting dmb function
       [not found] ` <1561911676-37718-1-git-send-email-gavin.hu@arm.com>
                     ` (3 preceding siblings ...)
  2019-09-27  5:41   ` [dpdk-stable] [PATCH v7 " Gavin Hu
@ 2019-10-21  9:47   ` Gavin Hu
  2019-10-21 19:00     ` [dpdk-stable] [dpdk-dev] " David Marchand
  2019-10-24 10:42   ` [dpdk-stable] [PATCH v9 1/5] " Gavin Hu
                     ` (4 subsequent siblings)
  9 siblings, 1 reply; 14+ messages in thread
From: Gavin Hu @ 2019-10-21  9:47 UTC (permalink / raw)
  To: dev
  Cc: nd, david.marchand, konstantin.ananyev, thomas, stephen,
	hemant.agrawal, jerinj, pbhagavatula, Honnappa.Nagarahalli,
	ruifeng.wang, phil.yang, steve.capper, stable

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@i
VI1PR08MB5376.eurprd08.prod.outlook.com/T/#u

Fixes: 3af733ba8da8 ("bus/fslmc: introduce MC object functions")
Cc: stable@dpdk.org

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phi.yang@arm.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/mc/fsl_mc_sys.h | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/bus/fslmc/mc/fsl_mc_sys.h b/drivers/bus/fslmc/mc/fsl_mc_sys.h
index d0c7b39..68ce38b 100644
--- a/drivers/bus/fslmc/mc/fsl_mc_sys.h
+++ b/drivers/bus/fslmc/mc/fsl_mc_sys.h
@@ -31,12 +31,10 @@ struct fsl_mc_io {
 #include <errno.h>
 #include <sys/uio.h>
 #include <linux/byteorder/little_endian.h>
+#include <rte_atomic.h>
 
-#ifndef dmb
-#define dmb() {__asm__ __volatile__("" : : : "memory"); }
-#endif
-#define __iormb()	dmb()
-#define __iowmb()	dmb()
+#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))
-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v8 1/6] bus/fslmc: fix the conflicting dmb function
  2019-10-21  9:47   ` [dpdk-stable] [PATCH v8 1/6] " Gavin Hu
@ 2019-10-21 19:00     ` David Marchand
  0 siblings, 0 replies; 14+ messages in thread
From: David Marchand @ 2019-10-21 19:00 UTC (permalink / raw)
  To: Gavin Hu, Hemant Agrawal
  Cc: dev, nd, Ananyev, Konstantin, Thomas Monjalon, Stephen Hemminger,
	Jerin Jacob Kollanukkaran, Pavan Nikhilesh, Honnappa Nagarahalli,
	Ruifeng Wang (Arm Technology China),
	Phil Yang, Steve Capper, dpdk stable

On Mon, Oct 21, 2019 at 11:48 AM Gavin Hu <gavin.hu@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"); }
>
> The fix is to reuse the EAL definition to avoid conflicts.
>
> [1] http://inbox.dpdk.org/users/VI1PR08MB537631AB25F41B8880DCCA988FDF0@i
> VI1PR08MB5376.eurprd08.prod.outlook.com/T/#u

This url is broken as reported previously.
I can fix when applying, but please take the time to fix basic issues
like this when reported.

>
> Fixes: 3af733ba8da8 ("bus/fslmc: introduce MC object functions")
> Cc: stable@dpdk.org
>
> Signed-off-by: Gavin Hu <gavin.hu@arm.com>
> Reviewed-by: Phil Yang <phi.yang@arm.com>
> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

Was the last change on using EAL memory barrier properly seen by Hemant ?
Just want to be sure he is ok.



> ---
>  drivers/bus/fslmc/mc/fsl_mc_sys.h | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/bus/fslmc/mc/fsl_mc_sys.h b/drivers/bus/fslmc/mc/fsl_mc_sys.h
> index d0c7b39..68ce38b 100644
> --- a/drivers/bus/fslmc/mc/fsl_mc_sys.h
> +++ b/drivers/bus/fslmc/mc/fsl_mc_sys.h
> @@ -31,12 +31,10 @@ struct fsl_mc_io {
>  #include <errno.h>
>  #include <sys/uio.h>
>  #include <linux/byteorder/little_endian.h>
> +#include <rte_atomic.h>
>
> -#ifndef dmb
> -#define dmb() {__asm__ __volatile__("" : : : "memory"); }
> -#endif
> -#define __iormb()      dmb()
> -#define __iowmb()      dmb()
> +#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))
> --
> 2.7.4
>


--
David Marchand


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-stable] [PATCH v9 1/5] bus/fslmc: fix the conflicting dmb function
       [not found] ` <1561911676-37718-1-git-send-email-gavin.hu@arm.com>
                     ` (4 preceding siblings ...)
  2019-10-21  9:47   ` [dpdk-stable] [PATCH v8 1/6] " Gavin Hu
@ 2019-10-24 10:42   ` Gavin Hu
  2019-10-25 15:39   ` [dpdk-stable] [PATCH v10 " Gavin Hu
                     ` (3 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Gavin Hu @ 2019-10-24 10:42 UTC (permalink / raw)
  To: dev
  Cc: nd, david.marchand, konstantin.ananyev, thomas, stephen,
	hemant.agrawal, jerinj, pbhagavatula, Honnappa.Nagarahalli,
	ruifeng.wang, phil.yang, steve.capper, stable

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: 3af733ba8da8 ("bus/fslmc: introduce MC object functions")
Cc: stable@dpdk.org

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phi.yang@arm.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/mc/fsl_mc_sys.h | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/bus/fslmc/mc/fsl_mc_sys.h b/drivers/bus/fslmc/mc/fsl_mc_sys.h
index d0c7b39..68ce38b 100644
--- a/drivers/bus/fslmc/mc/fsl_mc_sys.h
+++ b/drivers/bus/fslmc/mc/fsl_mc_sys.h
@@ -31,12 +31,10 @@ struct fsl_mc_io {
 #include <errno.h>
 #include <sys/uio.h>
 #include <linux/byteorder/little_endian.h>
+#include <rte_atomic.h>
 
-#ifndef dmb
-#define dmb() {__asm__ __volatile__("" : : : "memory"); }
-#endif
-#define __iormb()	dmb()
-#define __iowmb()	dmb()
+#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))
-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-stable] [PATCH v10 1/5] bus/fslmc: fix the conflicting dmb function
       [not found] ` <1561911676-37718-1-git-send-email-gavin.hu@arm.com>
                     ` (5 preceding siblings ...)
  2019-10-24 10:42   ` [dpdk-stable] [PATCH v9 1/5] " Gavin Hu
@ 2019-10-25 15:39   ` Gavin Hu
  2019-10-27 12:52   ` [dpdk-stable] [PATCH v11 " Gavin Hu
                     ` (2 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Gavin Hu @ 2019-10-25 15:39 UTC (permalink / raw)
  To: dev
  Cc: nd, david.marchand, konstantin.ananyev, thomas, stephen,
	hemant.agrawal, jerinj, pbhagavatula, Honnappa.Nagarahalli,
	ruifeng.wang, phil.yang, steve.capper, stable

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: 3af733ba8da8 ("bus/fslmc: introduce MC object functions")
Cc: stable@dpdk.org

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phi.yang@arm.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/mc/fsl_mc_sys.h | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/bus/fslmc/mc/fsl_mc_sys.h b/drivers/bus/fslmc/mc/fsl_mc_sys.h
index d0c7b39..68ce38b 100644
--- a/drivers/bus/fslmc/mc/fsl_mc_sys.h
+++ b/drivers/bus/fslmc/mc/fsl_mc_sys.h
@@ -31,12 +31,10 @@ struct fsl_mc_io {
 #include <errno.h>
 #include <sys/uio.h>
 #include <linux/byteorder/little_endian.h>
+#include <rte_atomic.h>
 
-#ifndef dmb
-#define dmb() {__asm__ __volatile__("" : : : "memory"); }
-#endif
-#define __iormb()	dmb()
-#define __iowmb()	dmb()
+#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))
-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-stable] [PATCH v11 1/5] bus/fslmc: fix the conflicting dmb function
       [not found] ` <1561911676-37718-1-git-send-email-gavin.hu@arm.com>
                     ` (6 preceding siblings ...)
  2019-10-25 15:39   ` [dpdk-stable] [PATCH v10 " Gavin Hu
@ 2019-10-27 12:52   ` Gavin Hu
  2019-11-04 15:32   ` [dpdk-stable] [PATCH v12 " Gavin Hu
       [not found]   ` <1573162528-16230-1-git-send-email-david.marchand@redhat.com>
  9 siblings, 0 replies; 14+ messages in thread
From: Gavin Hu @ 2019-10-27 12:52 UTC (permalink / raw)
  To: dev
  Cc: nd, david.marchand, konstantin.ananyev, thomas, stephen,
	hemant.agrawal, jerinj, pbhagavatula, Honnappa.Nagarahalli,
	ruifeng.wang, phil.yang, steve.capper, stable

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: 3af733ba8da8 ("bus/fslmc: introduce MC object functions")
Cc: stable@dpdk.org

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phi.yang@arm.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/mc/fsl_mc_sys.h | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/bus/fslmc/mc/fsl_mc_sys.h b/drivers/bus/fslmc/mc/fsl_mc_sys.h
index d0c7b39..68ce38b 100644
--- a/drivers/bus/fslmc/mc/fsl_mc_sys.h
+++ b/drivers/bus/fslmc/mc/fsl_mc_sys.h
@@ -31,12 +31,10 @@ struct fsl_mc_io {
 #include <errno.h>
 #include <sys/uio.h>
 #include <linux/byteorder/little_endian.h>
+#include <rte_atomic.h>
 
-#ifndef dmb
-#define dmb() {__asm__ __volatile__("" : : : "memory"); }
-#endif
-#define __iormb()	dmb()
-#define __iowmb()	dmb()
+#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))
-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-stable] [PATCH v12 1/5] bus/fslmc: fix the conflicting dmb function
       [not found] ` <1561911676-37718-1-git-send-email-gavin.hu@arm.com>
                     ` (7 preceding siblings ...)
  2019-10-27 12:52   ` [dpdk-stable] [PATCH v11 " Gavin Hu
@ 2019-11-04 15:32   ` Gavin Hu
       [not found]   ` <1573162528-16230-1-git-send-email-david.marchand@redhat.com>
  9 siblings, 0 replies; 14+ messages in thread
From: Gavin Hu @ 2019-11-04 15:32 UTC (permalink / raw)
  To: dev; +Cc: nd, david.marchand, konstantin.ananyev, stable

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: 3af733ba8da8 ("bus/fslmc: introduce MC object functions")
Cc: stable@dpdk.org

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phi.yang@arm.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/mc/fsl_mc_sys.h | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/bus/fslmc/mc/fsl_mc_sys.h b/drivers/bus/fslmc/mc/fsl_mc_sys.h
index d0c7b39..68ce38b 100644
--- a/drivers/bus/fslmc/mc/fsl_mc_sys.h
+++ b/drivers/bus/fslmc/mc/fsl_mc_sys.h
@@ -31,12 +31,10 @@ struct fsl_mc_io {
 #include <errno.h>
 #include <sys/uio.h>
 #include <linux/byteorder/little_endian.h>
+#include <rte_atomic.h>
 
-#ifndef dmb
-#define dmb() {__asm__ __volatile__("" : : : "memory"); }
-#endif
-#define __iormb()	dmb()
-#define __iowmb()	dmb()
+#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))
-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-stable] [PATCH v13 1/5] bus/fslmc: fix the conflicting dmb function
       [not found]   ` <1573162528-16230-1-git-send-email-david.marchand@redhat.com>
@ 2019-11-07 21:35     ` David Marchand
  2019-12-10  6:13       ` [dpdk-stable] [dpdk-dev] " Honnappa Nagarahalli
  0 siblings, 1 reply; 14+ messages in thread
From: David Marchand @ 2019-11-07 21:35 UTC (permalink / raw)
  To: dev
  Cc: nd, konstantin.ananyev, Gavin Hu, stable, Hemant Agrawal, Sachin Saxena

From: Gavin Hu <gavin.hu@arm.com>

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: 3af733ba8da8 ("bus/fslmc: introduce MC object functions")
Cc: stable@dpdk.org

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>
---
Changelog since v12:
- fixed Phil Yang mail address,

---
 drivers/bus/fslmc/mc/fsl_mc_sys.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/bus/fslmc/mc/fsl_mc_sys.h b/drivers/bus/fslmc/mc/fsl_mc_sys.h
index d0c7b39..a310c56 100644
--- a/drivers/bus/fslmc/mc/fsl_mc_sys.h
+++ b/drivers/bus/fslmc/mc/fsl_mc_sys.h
@@ -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))
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v13 1/5] bus/fslmc: fix the conflicting dmb function
  2019-11-07 21:35     ` [dpdk-stable] [PATCH v13 " David Marchand
@ 2019-12-10  6:13       ` Honnappa Nagarahalli
  0 siblings, 0 replies; 14+ messages in thread
From: Honnappa Nagarahalli @ 2019-12-10  6:13 UTC (permalink / raw)
  To: David Marchand, dev
  Cc: nd, konstantin.ananyev, Gavin Hu (Arm Technology China),
	stable, hemant.agrawal, Sachin.saxena@nxp.com, nd

In case there are more versions of the WFE patch, is it ok to merge this patch alone?. It will be one less patch to carry around.
Thanks,
Honnappa

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of David Marchand
> Sent: Thursday, November 7, 2019 3:35 PM
> To: dev@dpdk.org
> Cc: nd <nd@arm.com>; konstantin.ananyev@intel.com; Gavin Hu (Arm
> Technology China) <Gavin.Hu@arm.com>; stable@dpdk.org;
> hemant.agrawal@nxp.com; Sachin.saxena@nxp.com
> Subject: [dpdk-dev] [PATCH v13 1/5] bus/fslmc: fix the conflicting dmb
> function
> 
> From: Gavin Hu <gavin.hu@arm.com>
> 
> 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/VI1PR08MB537631AB25F41B8880DCCA988FDF
> 0@
> VI1PR08MB5376.eurprd08.prod.outlook.com/T/#u
> 
> Fixes: 3af733ba8da8 ("bus/fslmc: introduce MC object functions")
> Cc: stable@dpdk.org
> 
> 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>
> ---
> Changelog since v12:
> - fixed Phil Yang mail address,
> 
> ---
>  drivers/bus/fslmc/mc/fsl_mc_sys.h | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/bus/fslmc/mc/fsl_mc_sys.h
> b/drivers/bus/fslmc/mc/fsl_mc_sys.h
> index d0c7b39..a310c56 100644
> --- a/drivers/bus/fslmc/mc/fsl_mc_sys.h
> +++ b/drivers/bus/fslmc/mc/fsl_mc_sys.h
> @@ -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))
> --
> 1.8.3.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-12-10  6:13 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1566454356-37277-1-git-send-email-gavin.hu@arm.com>
     [not found] ` <1561911676-37718-1-git-send-email-gavin.hu@arm.com>
2019-08-22  6:12   ` [dpdk-stable] [PATCH v4 1/6] bus/fslmc: fix the conflicting dmb function Gavin Hu
2019-09-12 11:24   ` [dpdk-stable] [PATCH v5 2/8] " Gavin Hu
2019-09-14 14:59   ` [dpdk-stable] [PATCH v6 1/7] " Gavin Hu
2019-09-27  5:41   ` [dpdk-stable] [PATCH v7 " Gavin Hu
2019-09-27  8:24     ` Hemant Agrawal
2019-10-17 15:06     ` [dpdk-stable] [dpdk-dev] " David Marchand
2019-10-21  9:47   ` [dpdk-stable] [PATCH v8 1/6] " Gavin Hu
2019-10-21 19:00     ` [dpdk-stable] [dpdk-dev] " David Marchand
2019-10-24 10:42   ` [dpdk-stable] [PATCH v9 1/5] " Gavin Hu
2019-10-25 15:39   ` [dpdk-stable] [PATCH v10 " Gavin Hu
2019-10-27 12:52   ` [dpdk-stable] [PATCH v11 " Gavin Hu
2019-11-04 15:32   ` [dpdk-stable] [PATCH v12 " Gavin Hu
     [not found]   ` <1573162528-16230-1-git-send-email-david.marchand@redhat.com>
2019-11-07 21:35     ` [dpdk-stable] [PATCH v13 " David Marchand
2019-12-10  6:13       ` [dpdk-stable] [dpdk-dev] " Honnappa Nagarahalli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).