DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] common/octeontx2: fix to prevent STP instruction fissure
@ 2019-07-26  5:24 jerinj
  2019-07-29 19:54 ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: jerinj @ 2019-07-26  5:24 UTC (permalink / raw)
  To: dev, Jerin Jacob, Nithin Dabilpuram, Vamsi Attunuru; +Cc: thomas

From: Jerin Jacob <jerinj@marvell.com>

OTX2 AP core can sometimes fissure STP instructions when it is more
optimal to send such writes into the pipeline as 2 separate
instructions. However registers should be excluded from such
optimization. This commit ensures that no CSR write is ever fissured
by introducing zero cost workaround by setting STP pre-index by zero to
make sure OTX2 AP core prevent fissure.

Fixes: 8a4f835971f5 ("common/octeontx2: add IO handling APIs")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/common/octeontx2/otx2_io_arm64.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/octeontx2/otx2_io_arm64.h b/drivers/common/octeontx2/otx2_io_arm64.h
index 468243c04..7e45329b3 100644
--- a/drivers/common/octeontx2/otx2_io_arm64.h
+++ b/drivers/common/octeontx2/otx2_io_arm64.h
@@ -14,7 +14,7 @@
 
 #define otx2_store_pair(val0, val1, addr) ({		\
 	asm volatile(					\
-	"stp %x[x0], %x[x1], [%x[p1]]"			\
+	"stp %x[x0], %x[x1], [%x[p1],#0]!"		\
 	::[x0]"r"(val0), [x1]"r"(val1), [p1]"r"(addr)	\
 	); })
 
-- 
2.22.0


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

* Re: [dpdk-dev] [PATCH] common/octeontx2: fix to prevent STP instruction fissure
  2019-07-26  5:24 [dpdk-dev] [PATCH] common/octeontx2: fix to prevent STP instruction fissure jerinj
@ 2019-07-29 19:54 ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2019-07-29 19:54 UTC (permalink / raw)
  To: jerinj; +Cc: dev, Nithin Dabilpuram, Vamsi Attunuru

26/07/2019 07:24, jerinj@marvell.com:
> From: Jerin Jacob <jerinj@marvell.com>
> 
> OTX2 AP core can sometimes fissure STP instructions when it is more
> optimal to send such writes into the pipeline as 2 separate
> instructions. However registers should be excluded from such
> optimization. This commit ensures that no CSR write is ever fissured
> by introducing zero cost workaround by setting STP pre-index by zero to
> make sure OTX2 AP core prevent fissure.
> 
> Fixes: 8a4f835971f5 ("common/octeontx2: add IO handling APIs")
> 
> Signed-off-by: Jerin Jacob <jerinj@marvell.com>

Applied, thanks




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

* Re: [dpdk-dev] [PATCH] common/octeontx2: fix to prevent STP instruction fissure
@ 2019-07-27 11:51 Pavan Nikhilesh Bhagavatula
  0 siblings, 0 replies; 3+ messages in thread
From: Pavan Nikhilesh Bhagavatula @ 2019-07-27 11:51 UTC (permalink / raw)
  To: Jerin Jacob Kollanukkaran, dev, Jerin Jacob Kollanukkaran,
	Nithin Kumar Dabilpuram, Vamsi Krishna Attunuru
  Cc: thomas



>-----Original Message-----
>From: dev <dev-bounces@dpdk.org> On Behalf Of jerinj@marvell.com
>Sent: Friday, July 26, 2019 10:55 AM
>To: dev@dpdk.org; Jerin Jacob Kollanukkaran <jerinj@marvell.com>;
>Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Vamsi Krishna
>Attunuru <vattunuru@marvell.com>
>Cc: thomas@monjalon.net
>Subject: [EXT] [dpdk-dev] [PATCH] common/octeontx2: fix to prevent
>STP instruction fissure
>From: Jerin Jacob <jerinj@marvell.com>
>
>OTX2 AP core can sometimes fissure STP instructions when it is more
>optimal to send such writes into the pipeline as 2 separate
>instructions. However registers should be excluded from such
>optimization. This commit ensures that no CSR write is ever fissured
>by introducing zero cost workaround by setting STP pre-index by zero to
>make sure OTX2 AP core prevent fissure.
>
>Fixes: 8a4f835971f5 ("common/octeontx2: add IO handling APIs")
>
>Signed-off-by: Jerin Jacob <jerinj@marvell.com>

Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

>---
> drivers/common/octeontx2/otx2_io_arm64.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/common/octeontx2/otx2_io_arm64.h
>b/drivers/common/octeontx2/otx2_io_arm64.h
>index 468243c04..7e45329b3 100644
>--- a/drivers/common/octeontx2/otx2_io_arm64.h
>+++ b/drivers/common/octeontx2/otx2_io_arm64.h
>@@ -14,7 +14,7 @@
>
> #define otx2_store_pair(val0, val1, addr) ({		\
> 	asm volatile(					\
>-	"stp %x[x0], %x[x1], [%x[p1]]"			\
>+	"stp %x[x0], %x[x1], [%x[p1],#0]!"		\
> 	::[x0]"r"(val0), [x1]"r"(val1), [p1]"r"(addr)	\
> 	); })
>
>--
>2.22.0


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

end of thread, other threads:[~2019-07-29 19:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-26  5:24 [dpdk-dev] [PATCH] common/octeontx2: fix to prevent STP instruction fissure jerinj
2019-07-29 19:54 ` Thomas Monjalon
2019-07-27 11:51 Pavan Nikhilesh Bhagavatula

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).