From 2557cf8f9e5b187622d8a863e0f452773f5e0082 Mon Sep 17 00:00:00 2001 From: Youri Querry Date: Fri, 11 Jan 2019 12:24:08 +0000 Subject: [PATCH] bus/fslmc: fix ring mode to use correct cache settings 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 Acked-by: Shreyansh Jain --- 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 3380e54f5c..bbea37efca 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 d41af83580..0571097abe 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.20.1