patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: "ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
	Shreyansh Jain <shreyansh.jain@nxp.com>,
	Youri Querry <youri.querry_1@nxp.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: [dpdk-stable] [PATCH 02/20] bus/fslmc: fix the ring mode to use correct cache settings
Date: Thu, 27 Dec 2018 06:22:54 +0000	[thread overview]
Message-ID: <20181227062233.30781-3-hemant.agrawal@nxp.com> (raw)
In-Reply-To: <20181227062233.30781-1-hemant.agrawal@nxp.com>

From: Youri Querry <youri.querry_1@nxp.com>

The code was incorrectly using the cache inhibited access.
It shall use cached enabled access for better performance.

Fixes: 293c0ca94c36 ("bus/fslmc: support memory backed portals with QBMAN 5.0")
Cc: stable@dpdk.org

Signed-off-by: Youri Querry <youri.querry_1@nxp.com>
---
 drivers/bus/fslmc/qbman/qbman_portal.c | 12 ++++++------
 drivers/bus/fslmc/qbman/qbman_sys.h    |  1 +
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/bus/fslmc/qbman/qbman_portal.c b/drivers/bus/fslmc/qbman/qbman_portal.c
index 3380e54f5..bbea37efc 100644
--- a/drivers/bus/fslmc/qbman/qbman_portal.c
+++ b/drivers/bus/fslmc/qbman/qbman_portal.c
@@ -683,8 +683,8 @@ static int qbman_swp_enqueue_ring_mode_mem_back(struct qbman_swp *s,
 	full_mask = s->eqcr.pi_mask;
 	if (!s->eqcr.available) {
 		eqcr_ci = s->eqcr.ci;
-		s->eqcr.ci = qbman_cinh_read(&s->sys,
-				QBMAN_CENA_SWP_EQCR_CI) & full_mask;
+		s->eqcr.ci = qbman_cena_read_reg(&s->sys,
+				QBMAN_CENA_SWP_EQCR_CI_MEMBACK) & full_mask;
 		s->eqcr.available = qm_cyc_diff(s->eqcr.pi_ring_size,
 				eqcr_ci, s->eqcr.ci);
 		if (!s->eqcr.available)
@@ -809,8 +809,8 @@ static int qbman_swp_enqueue_multiple_mem_back(struct qbman_swp *s,
 	full_mask = s->eqcr.pi_mask;
 	if (!s->eqcr.available) {
 		eqcr_ci = s->eqcr.ci;
-		s->eqcr.ci = qbman_cinh_read(&s->sys,
-				QBMAN_CENA_SWP_EQCR_CI) & full_mask;
+		s->eqcr.ci = qbman_cena_read_reg(&s->sys,
+				QBMAN_CENA_SWP_EQCR_CI_MEMBACK) & full_mask;
 		s->eqcr.available = qm_cyc_diff(s->eqcr.pi_ring_size,
 					eqcr_ci, s->eqcr.ci);
 		if (!s->eqcr.available)
@@ -941,8 +941,8 @@ static int qbman_swp_enqueue_multiple_desc_mem_back(struct qbman_swp *s,
 	full_mask = s->eqcr.pi_mask;
 	if (!s->eqcr.available) {
 		eqcr_ci = s->eqcr.ci;
-		s->eqcr.ci = qbman_cinh_read(&s->sys,
-				QBMAN_CENA_SWP_EQCR_CI) & full_mask;
+		s->eqcr.ci = qbman_cena_read_reg(&s->sys,
+				QBMAN_CENA_SWP_EQCR_CI_MEMBACK) & full_mask;
 		s->eqcr.available = qm_cyc_diff(s->eqcr.pi_ring_size,
 					eqcr_ci, s->eqcr.ci);
 		if (!s->eqcr.available)
diff --git a/drivers/bus/fslmc/qbman/qbman_sys.h b/drivers/bus/fslmc/qbman/qbman_sys.h
index d41af8358..0571097ab 100644
--- a/drivers/bus/fslmc/qbman/qbman_sys.h
+++ b/drivers/bus/fslmc/qbman/qbman_sys.h
@@ -55,6 +55,7 @@
 #define QBMAN_CENA_SWP_RR(vb)  (0x700 + ((uint32_t)(vb) >> 1))
 #define QBMAN_CENA_SWP_VDQCR   0x780
 #define QBMAN_CENA_SWP_EQCR_CI 0x840
+#define QBMAN_CENA_SWP_EQCR_CI_MEMBACK 0x1840
 
 /* CENA register offsets in memory-backed mode */
 #define QBMAN_CENA_SWP_DQRR_MEM(n)  (0x800 + ((uint32_t)(n) << 6))
-- 
2.17.1

  parent reply	other threads:[~2018-12-27  6:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20181227062233.30781-1-hemant.agrawal@nxp.com>
2018-12-27  6:22 ` [dpdk-stable] [PATCH 01/20] bus/fslmc: fix to reset portal memory before use Hemant Agrawal
2018-12-27  6:22 ` Hemant Agrawal [this message]
2018-12-27  6:22 ` [dpdk-stable] [PATCH 03/20] bus/fslmc: fix to use correct physical core for logical core Hemant Agrawal
2018-12-27  6:22 ` [dpdk-stable] [PATCH 04/20] net/dpaa2: fix bad check for not-null Hemant Agrawal
2018-12-27  6:22 ` [dpdk-stable] [PATCH 05/20] bus/fslmc: fix to convert error msg to warning Hemant Agrawal
2018-12-27  6:23 ` [dpdk-stable] [PATCH 06/20] bus/fslmc: fix parse method for bus devices Hemant Agrawal
2018-12-27  6:23 ` [dpdk-stable] [PATCH 07/20] net/dpaa2: fix device init for secondary process Hemant Agrawal
     [not found] ` <20190111115712.6482-1-shreyansh.jain@nxp.com>
2019-01-11 11:57   ` [dpdk-stable] [PATCH v2 01/20] bus/fslmc: fix to reset portal memory before use Shreyansh Jain
2019-01-11 11:57   ` [dpdk-stable] [PATCH v2 02/20] bus/fslmc: fix the ring mode to use correct cache settings Shreyansh Jain
2019-01-11 11:57   ` [dpdk-stable] [PATCH v2 03/20] bus/fslmc: fix to use correct physical core for logical core Shreyansh Jain
2019-01-11 11:58   ` [dpdk-stable] [PATCH v2 04/20] net/dpaa2: fix bad check for not-null Shreyansh Jain
2019-01-11 11:58   ` [dpdk-stable] [PATCH v2 05/20] bus/fslmc: fix to convert error msg to warning Shreyansh Jain
2019-01-11 11:58   ` [dpdk-stable] [PATCH v2 06/20] bus/fslmc: fix parse method for bus devices Shreyansh Jain
2019-01-11 11:58   ` [dpdk-stable] [PATCH v2 07/20] net/dpaa2: fix device init for secondary process Shreyansh Jain
     [not found]   ` <20190111122305.7133-1-shreyansh.jain@nxp.com>
2019-01-11 12:24     ` [dpdk-stable] [PATCH v3 01/19] bus/fslmc: fix to reset portal memory before use Shreyansh Jain
2019-01-11 12:24     ` [dpdk-stable] [PATCH v3 02/19] bus/fslmc: fix the ring mode to use correct cache settings Shreyansh Jain
2019-01-11 12:24     ` [dpdk-stable] [PATCH v3 03/19] bus/fslmc: fix to use correct physical core for logical core Shreyansh Jain
2019-01-11 12:24     ` [dpdk-stable] [PATCH v3 04/19] net/dpaa2: fix bad check for not-null Shreyansh Jain
2019-01-11 12:24     ` [dpdk-stable] [PATCH v3 05/19] bus/fslmc: fix to convert error msg to warning Shreyansh Jain
2019-01-11 12:24     ` [dpdk-stable] [PATCH v3 06/19] bus/fslmc: fix parse method for bus devices Shreyansh Jain
2019-01-11 12:24     ` [dpdk-stable] [PATCH v3 07/19] net/dpaa2: fix device init for secondary process Shreyansh Jain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181227062233.30781-3-hemant.agrawal@nxp.com \
    --to=hemant.agrawal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=shreyansh.jain@nxp.com \
    --cc=stable@dpdk.org \
    --cc=youri.querry_1@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).