From patchwork Thu Dec 27 06:22:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 154547 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6604282ljp; Wed, 26 Dec 2018 22:23:13 -0800 (PST) X-Google-Smtp-Source: ALg8bN5ent41AK2ElLgNX3L9IzmuLQZCqXjVeFy2LN2Bq4EvAMkZUPdxMS/VOkRDD3d7bxf09StH X-Received: by 2002:adf:dc4e:: with SMTP id m14mr21290354wrj.107.1545891792955; Wed, 26 Dec 2018 22:23:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545891792; cv=none; d=google.com; s=arc-20160816; b=uze6xU27P/HLm7CtVDFaZOSn/RPYltVlCCrCuss8Xe7shYRUhCN8PPlhxyEKX3b8PS jDtii/n+x3nm/9J8bqwDRU2h0+cR9HQhcwh/OB7DxzPE0aCfg/FTnYcKh3cwkmaMgoEk cIKoFHVMyvUH82PK73ql1m6+XBhU07+nfqtTMNSWHh4edd8ZzJgAWRJm74W7c6tojjPN sSgvKXRFhu+0bgshZcmYShRUMh6DaGt7mDYvlrmFkT06drUQBsxHrpraYInr8hYAkh3D bViUGS2ZMqZFBw2XI6st9+8JVvJxQBgrFOc/z3q/jaSWxoRY3jaM27qW/Ruuu4V0JsMN XdjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:mime-version :content-transfer-encoding:spamdiagnosticmetadata :spamdiagnosticoutput:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:cc:to:from :dkim-signature; bh=LN+7svjFBmgRsw15vJupOLPp9a5SS+JI2X1eOESWi+0=; b=PeyD4dMo2vE1EngzlHYZ3M++L98rQv5vVQL638KI3MvgTO3S/ZriCtG72rY0Zl8TJL odVL7mHn/Kt6gy32pvbq3WWvoBFpj7bM09wetksVnHXTXN2Hh3/JuwvAv0HRYSGOxq5I ghvzBUtj3e0JcH6xK7+oZq/vwxp2U43elTFSFT5o0hC/zL8voIjqHPqPtcFQvORIIXvZ DcZ75NOSXjAzUSUilCf5EkXbjAd+Cbr4SJkSXVF1/6SB8h7vwBWfC5kwxk7YOHC1pFpb amAL221Efx+zIMkMWPWf/OjZvK/5sT8QoCnmZMrDe1x27YaafjOwfWE0kdu/y4zcIrzH h5+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=Cvx+D2Om; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id h11si19113746wrw.18.2018.12.26.22.23.12; Wed, 26 Dec 2018 22:23:12 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=Cvx+D2Om; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 04F784C8E; Thu, 27 Dec 2018 07:22:59 +0100 (CET) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140041.outbound.protection.outlook.com [40.107.14.41]) by dpdk.org (Postfix) with ESMTP id 56169343C; Thu, 27 Dec 2018 07:22:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LN+7svjFBmgRsw15vJupOLPp9a5SS+JI2X1eOESWi+0=; b=Cvx+D2OmFLlrdxY7zcCAYcdsVmPXrIRjCvLpJHy3XDXGZpk5wlUBQhM9n7Twxx5z3EeFKg6vu7QN9NCiAInlaBmbpZL4705Ne2YGdDV3zZ3AfXvR+oJGWSfMBtbSGfgYA/fp31Wpzo31mBh5AAvE4SyBupMSo9omSF1hwTeujig= Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com (10.168.65.19) by VI1PR0401MB2382.eurprd04.prod.outlook.com (10.169.134.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1471.20; Thu, 27 Dec 2018 06:22:54 +0000 Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com ([fe80::555e:164:f8f0:dbb4]) by VI1PR0401MB2541.eurprd04.prod.outlook.com ([fe80::555e:164:f8f0:dbb4%2]) with mapi id 15.20.1471.019; Thu, 27 Dec 2018 06:22:54 +0000 From: Hemant Agrawal To: "dev@dpdk.org" CC: "ferruh.yigit@intel.com" , Shreyansh Jain , Youri Querry , "stable@dpdk.org" Thread-Topic: [PATCH 02/20] bus/fslmc: fix the ring mode to use correct cache settings Thread-Index: AQHUnayZzCxa8+Z8R06Auv6dMnh3MQ== Date: Thu, 27 Dec 2018 06:22:54 +0000 Message-ID: <20181227062233.30781-3-hemant.agrawal@nxp.com> References: <20181227062233.30781-1-hemant.agrawal@nxp.com> In-Reply-To: <20181227062233.30781-1-hemant.agrawal@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [14.143.30.134] x-mailer: git-send-email 2.17.1 x-clientproxiedby: BM1PR01CA0120.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:40::14) To VI1PR0401MB2541.eurprd04.prod.outlook.com (2603:10a6:800:56::19) authentication-results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0401MB2382; 6:9ISOFIRLgtaTsM5GZMrkQnIqwnrN7mxYt+4FqOGoPOuixF4L+AB4wbACSmCwJE1ZJntsabrnJOFCkhh31uN68JtyVF79h+6LS1QMhxHMSlowvPosiN7x2i8W2pyKVQRgbpfKvj2t2EKEDv1jJPBbAq0aXV7Pu1JNdQd5I0EAxGbdPLxNDXe2xevIyiq1hlbvCCDeYGO2GN1szesdJp84So1/nMtSVIBoPtXq2a48YvWvfPVuTVlNPR/G7Qzl4viF7e6lZdQnQKGLn/pfn5CR3A8O1FJANbuW3HO4stSr7G9cGdoUFPUteTVnkVUPHyQxoQny66ktIQISrI6Jg9a5GZDXA/LYZnngKmhIZlWYTfa86M5fLCHc5rjue6ndQCYGQGSCx/Rewq0rksiAHsIufvYHr/KefvZkvnEFaxtE37Bb/cEx1le9dJnohCP0WUDjA6Wzj7GHImCgifxQq0jHyQ==; 5:iWk4IFVU1NjuyQbynM6gWuy3t2khZNY8Rw323/nhGqrKNYFQvauCo1Of6gWqtGsjcM4DZKjonOKf8v6OOk2LDiZruQ+aXJtHWlmtEbx/WIz1K7nhmPmbylphDV3nU2jH3p2gjGlT1AksvVGbZl1oIjgNuV1g10nv6ElntF9D9m4=; 7:+AzsyCTQ1/fyOjULh7JnWrcirVp/TYkExW8Jch90VaXYMuzZjQ/AXGFCW4NoRa/xuiCtzD1g5U0EubPkTdcMv/IiNRRicK9xbXEA6UBHjTI2zyAOi3omr+i2zGw70IumGYcDVMBlxT17aHTtoxdtDQ== x-ms-office365-filtering-correlation-id: a3a5f32a-46ba-4422-2ef9-08d66bc3bc29 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0401MB2382; x-ms-traffictypediagnostic: VI1PR0401MB2382: x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(3230021)(908002)(999002)(5005026)(6040522)(2401047)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231475)(944501520)(52105112)(6055026)(6041310)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:VI1PR0401MB2382; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0401MB2382; x-forefront-prvs: 0899B47777 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(396003)(366004)(376002)(39860400002)(346002)(199004)(189003)(5660300001)(1076003)(575784001)(26005)(76176011)(186003)(71200400001)(256004)(25786009)(105586002)(4326008)(6436002)(305945005)(11346002)(106356001)(14444005)(446003)(44832011)(476003)(7736002)(55236004)(102836004)(78486014)(486006)(386003)(68736007)(52116002)(86362001)(6506007)(2616005)(71190400001)(66066001)(316002)(54906003)(6116002)(3846002)(2906002)(14454004)(36756003)(99286004)(50226002)(8936002)(1730700003)(81156014)(81166006)(8676002)(6512007)(53936002)(478600001)(97736004)(6486002)(6916009)(5640700003)(2351001)(2501003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2382; H:VI1PR0401MB2541.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: rdjXPsE7/Ga7VIaf1KwQmo9s90nZhwvn6M1tBeeTuvmLTYMoKiasu1WJSz0dCGFG2LIdKeIS083WrL42IGyD/vIb86sFO7A4nIcfBV1kwsxxTGdm+tWA8WmELju+W173+PXOABAn9pNapJ0X1AxZ+MlY8/UH0nnLq9I7K46E3FWmDo3txgq4QNc/ms5VJ9pSbPLPJQTNNZQPzA0f08hF5gX8rYt1yiZIVbGdwpUIkINlNsVy/ffIXZQ73O8HDiu/TKGVY+Kkfm4fdbK1bA8v23zrZwJcwSzGqQcUBnSmhbwm4nKc76NFhKNgL7jbJKPQ spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3a5f32a-46ba-4422-2ef9-08d66bc3bc29 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Dec 2018 06:22:54.2395 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2382 Subject: [dpdk-dev] [PATCH 02/20] bus/fslmc: fix the ring mode to use correct cache settings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Youri Querry 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 --- drivers/bus/fslmc/qbman/qbman_portal.c | 12 ++++++------ drivers/bus/fslmc/qbman/qbman_sys.h | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) -- 2.17.1 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))