From patchwork Wed Mar 14 07:56:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 131562 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp548524ljb; Wed, 14 Mar 2018 00:59:13 -0700 (PDT) X-Google-Smtp-Source: AG47ELv+M359UwgIphofEMYl7+eoU00dZdd+HCq/GZz0cFiYkZO8t7g4ySJEY2F0smLSpZ6E9Mbt X-Received: by 10.223.133.209 with SMTP id 17mr2956259wru.143.1521014353431; Wed, 14 Mar 2018 00:59:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521014353; cv=none; d=google.com; s=arc-20160816; b=ihPjXcjICe5sWPHD7H/CZENamlm+OzNyBwsR0iUdjn3DZtZoVAGaTFyHdSPSS1JP2f 0WGG0YwhiNoewO5WyxaXcWauwtYRGIoGg7OlbDx1Z5xoFnGG/aGaMD2YzwEftihIikt4 iyO/JSzPlI+foOlSY3i34qRU7RkgeS+IAFVDYBzhrYPXDlnkrXRNVNcahh18G38aTmlZ x/0MU1V/iwYUc8kah7xZu+DdP4aY7PuSuGVjlX2f9/GUtWzRgS3BoXi55cFPvFbEU3L9 kF85WSKlbmXOQhkgPLdnTaTg1+Qk23qYo2IxeF7pJ22H2GHa5j4Et8saQWiWjSM5daGL eliA== 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:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:dkim-signature:arc-authentication-results; bh=To8CPbx0zPrhJRiP/hS3GfrkUqDoIpo6VimzlVgrTkU=; b=uz2D4IPNDg8paoH8GvLmGB7qSdaTPFcpfa04mkQsfngqBXXykmtiHg6mj7HKNICNeK Rwpv9hnT7Eg7qccMhayPXCNJnZw2UVVeSaB2kBv4CItwxf1u84UIT9tiJ5En1SszsQ4F 1NBOCAojS/ZxeNabnDHaL8NeAP+QyxOsFVL6Q67Bl9L5eKp+kIUJAxQtHFQLX6tUrlGV QCqKqA3KfP+IQ41L+u1u5qQNGtA7SYYYUBxjQwUBlNTC1RZRJ+Aly0MqtaNdYlzk0zRi EOS0oBRrZSW8WE4r6eTvtWG9GVD3hOUBVd30HmW8WQeEQ+pz+0w+B2gOtx5DOF8f8yOe o5nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=yNMU8jzS; 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 s144si488484wme.258.2018.03.14.00.59.13; Wed, 14 Mar 2018 00:59:13 -0700 (PDT) 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=yNMU8jzS; 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 A79CBA49B; Wed, 14 Mar 2018 08:58:10 +0100 (CET) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40048.outbound.protection.outlook.com [40.107.4.48]) by dpdk.org (Postfix) with ESMTP id 6C6E15F1F for ; Wed, 14 Mar 2018 08:58:06 +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; bh=To8CPbx0zPrhJRiP/hS3GfrkUqDoIpo6VimzlVgrTkU=; b=yNMU8jzSAvYzbbIuTfp3mo3iJsfD+5zPDTDJIBEuRiVRYRf82YLjcxe/Y4/ZYarq6xXiyY+szEzIkdRF8CJ7VjQGtrs9NhXaYGPtWo6ZJAQLSs78S7VVyZr7DxUmRDTfBg8KUZQBwTuwPbkXGSvMGuiijwq9afJ04Qejz3eivdw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by AM2PR04MB0754.eurprd04.prod.outlook.com (2a01:111:e400:8411::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Wed, 14 Mar 2018 07:58:04 +0000 From: Hemant Agrawal To: dev@dpdk.org, bruce.richardson@intel.com Cc: thomas@monjalon.net Date: Wed, 14 Mar 2018 13:26:01 +0530 Message-Id: <1521014166-3201-6-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521014166-3201-1-git-send-email-hemant.agrawal@nxp.com> References: <1519889597-5805-1-git-send-email-hemant.agrawal@nxp.com> <1521014166-3201-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: BM1PR0101CA0008.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:18::18) To AM2PR04MB0754.eurprd04.prod.outlook.com (2a01:111:e400:8411::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 68743594-b1bd-4320-4122-08d589815171 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0754; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0754; 3:E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hkfP21SC2AdpB1tnCGhKkoXlyytpPf/0yHFAt1gscQp9b5V53ZOpB75RxnuKqR3GZoyVmWe9z+p2Gopf3wowINfK42FXy30+GCUBNclABBKmut2rYaW6uqcWRtx6+KEAlHVRgK7KG97JCke0Lds4Pt65bmZV+ityscQYa6fuDPxt47dWGMrywWFrWtDDULhj1P2h6REb9g3aGpK6613xhJ0gEYr657ZLPTrRFbqOXg4gdzRJA1LJXpNzT6qnylSeeEjLwqxKnIuQNq4RVcHHVvrVkDLy1DcxPtGxREAkrE33IwuLbK+tlGhLA5GmgUFpSKc+5cPMSBf61Y8bKmd5GaGph; 4:pkjKFQ2zsfIgOuLxU9hGwGRIIlXGyUJySxX3AtoSWHCpbVRdmKiRCbke7B5cbq+L2zByo1RHK+qfmlsL2rNzTy0w/Wy91c58/vwjzr/w5kN173dLUpykU6KXEr83FSQUVXCT2DM7RD2oV6TqcLybyeDJqbHnOQMX4UK8YL5JHfV8Y0A1c9IN1nnlI54puh4qMMTKOv87TWLGaH9lo9xd7Ee/HpzZFuYCGk5zn71Oz5ibo4CRk/MyoFx+RFFaRXhiMbH4bubnrc08JqIMHrTjJr8tvU+t4Ssvqu7wygPDybzqghcBTHNS8vFYTjBnrh0Y X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501244)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM2PR04MB0754; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0754; X-Forefront-PRVS: 0611A21987 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(376002)(39860400002)(346002)(39380400002)(396003)(366004)(199004)(189003)(316002)(4326008)(16526019)(47776003)(6506007)(66066001)(186003)(52116002)(86362001)(386003)(55236004)(48376002)(2906002)(97736004)(68736007)(26005)(5660300001)(25786009)(105586002)(76176011)(51416003)(6512007)(50466002)(5009440100003)(6666003)(36756003)(16586007)(81166006)(6486002)(8936002)(106356001)(305945005)(7736002)(50226002)(6116002)(53936002)(81156014)(8676002)(2950100002)(3846002)(478600001)(110426004)(473944003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0754; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0754; 23:WdgBBaqzinY8vuwADkM+tpUh/4qsY4ccNSa+4pKJK?= L9wHrIzW+cTeJWX01Lhccjl+Zwlij3tpSbbYi2VvYJAXHTIPa9b1g97HohYCS9M7xO7jiJQiJWa1p58GU3df4RlZx/wMNU7PuOp99cNSbYTNv1ebMdv7ZbYI+SYaIH5Zxs4dTdNH10oEDtSXNivXPK0pLXj5Hq+6xHKrd2mI+gdluGUJMAdlvc+M9Eco8sTydHsIVMDNg9YFQhztNihr7WW5aQTcnoGOpj2lDcNYAlAZ3rq6kOkDqGtJ78ECgwige69pNnObyTfVpz3Duero6F7bjYwvaihU4o98pJ2+8TvJQV38LYL8LC8zMGkMk0Ol03cNV0sBkBu6MQqK0qvE9js268/GvJJ6MelILgz6l/XECWBY3QLn7waUWsPg5vdQWbbHi9w6tbWnIuR6ZvyIfPsQcsiGCBuRWvFlvgFUVrMYMZmblIix+gaselFjrfG5sN1LlYAKM42/1zc0SPxoaWETW/RjMOCPxGZTmP2BBAVk3FY9ICQLc7IMJP3fRabeRgQGqENcSO3jEd63MZ+BiZ0r8iCLQBUEARfl41HiDwSfRobJQN5qDhyyiunNUZDG8i3Cv/A8WJsVEqF/0T63McRu7WwEimclAsU79RIzKK4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Qrr7awQVL+aUbu59CPgl6v3oy0akRllyWELJ1fXXWlHPn+LefYCioNYHI8ui9PPnLSVs42dgVjg8dPDXgxkrAA5jrLmeIBIeWk/nTmYY24GH5NXxQKCyIo35tF9XOs893gYqou1VaE/GUIyULKB4EVSlb2l74kB8=; 5:XOZ7r8w4Jspol0B1AtNXz5y5hr7YsAENhmjTJEIa2wB9GJFYnA8Od2tU8W8D4PQbSZ2gBwBhkrJQrLOqH+wAxDiVHTFDLsx/+a99r6jj4Fg4/luFC8kz3JwswA56NZutTC/O45qGplmvHx3+4NbJEb0gUosM4DLNsHANrMaJygw=; 24:MdFxUf+Lxle33M3K2go62VOgRjR8gnP6XINXZU1q23db+oERO6wgkgCcAOYYw+kljSUKvKf7n691wo53EhAgXsJ8n7r9SecRSu/hIT87wjQ=; 7:dYY9ykNQtL3JIeB7ovh6GLAJdIIHmZj7l6RZOkcWJ6nvqj7DoxK1pU6EznGtkQeEXv55oa/7soMq9gdnqBFyTi81nOholocwfeTtC+EdLWy1MdElM3T6Yxta5W4gMxd58kiSlmMJyZhAQkB4AeL+UEAWFlyQcFkBtHWxPdAQdp5tqRfFebe+c22LO6vPRGtRuirp+NcJJdfo+3OEOq+HaVXKsmRqp7fwNFfPO+gVs8tinz8iTEjoVy1Q9n0xrXZu SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2018 07:58:04.5455 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 68743594-b1bd-4320-4122-08d589815171 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0754 Subject: [dpdk-dev] [PATCH v3 05/10] bus/fslmc: add 32 bit functional support for ARM 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" This patch adds the functional logic to make the dpaa2 drivers work on 32bit machine. Signed-off-by: Hemant Agrawal --- drivers/bus/fslmc/qbman/qbman_sys.h | 30 ++++++++++++++++++++++++++++-- drivers/bus/fslmc/qbman/qbman_sys_decl.h | 9 +++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/bus/fslmc/qbman/qbman_sys.h b/drivers/bus/fslmc/qbman/qbman_sys.h index 846788e..2bd33ea 100644 --- a/drivers/bus/fslmc/qbman/qbman_sys.h +++ b/drivers/bus/fslmc/qbman/qbman_sys.h @@ -20,6 +20,9 @@ #include "qbman_sys_decl.h" +#define CENA_WRITE_ENABLE 0 +#define CINH_WRITE_ENABLE 1 + /* Debugging assists */ static inline void __hexdump(unsigned long start, unsigned long end, unsigned long p, size_t sz, const unsigned char *c) @@ -178,7 +181,11 @@ static inline void *qbman_cena_write_start_wo_shadow(struct qbman_swp_sys *s, s->addr_cena, s->idx, offset); #endif QBMAN_BUG_ON(offset & 63); +#ifdef RTE_ARCH_64 return (s->addr_cena + offset); +#else + return (s->addr_cinh + offset); +#endif } static inline void qbman_cena_write_complete(struct qbman_swp_sys *s, @@ -191,11 +198,19 @@ static inline void qbman_cena_write_complete(struct qbman_swp_sys *s, s->addr_cena, s->idx, offset, shadow); hexdump(cmd, 64); #endif +#ifdef RTE_ARCH_64 for (loop = 15; loop >= 1; loop--) __raw_writel(shadow[loop], s->addr_cena + offset + loop * 4); lwsync(); __raw_writel(shadow[0], s->addr_cena + offset); +#else + for (loop = 15; loop >= 1; loop--) + __raw_writel(shadow[loop], s->addr_cinh + + offset + loop * 4); + lwsync(); + __raw_writel(shadow[0], s->addr_cinh + offset); +#endif dcbf(s->addr_cena + offset); } @@ -224,9 +239,15 @@ static inline void *qbman_cena_read(struct qbman_swp_sys *s, uint32_t offset) s->addr_cena, s->idx, offset, shadow); #endif +#ifdef RTE_ARCH_64 for (loop = 0; loop < 16; loop++) shadow[loop] = __raw_readl(s->addr_cena + offset + loop * 4); +#else + for (loop = 0; loop < 16; loop++) + shadow[loop] = __raw_readl(s->addr_cinh + offset + + loop * 4); +#endif #ifdef QBMAN_CENA_TRACE hexdump(shadow, 64); #endif @@ -313,6 +334,11 @@ static inline int qbman_swp_sys_init(struct qbman_swp_sys *s, uint8_t dqrr_size) { uint32_t reg; +#ifdef RTE_ARCH_64 + uint8_t wn = CENA_WRITE_ENABLE; +#else + uint8_t wn = CINH_WRITE_ENABLE; +#endif s->addr_cena = d->cena_bar; s->addr_cinh = d->cinh_bar; @@ -333,10 +359,10 @@ static inline int qbman_swp_sys_init(struct qbman_swp_sys *s, QBMAN_BUG_ON(reg); #endif if (s->eqcr_mode == qman_eqcr_vb_array) - reg = qbman_set_swp_cfg(dqrr_size, 0, 0, 3, 2, 3, 1, 1, 1, 1, + reg = qbman_set_swp_cfg(dqrr_size, wn, 0, 3, 2, 3, 1, 1, 1, 1, 1, 1); else - reg = qbman_set_swp_cfg(dqrr_size, 0, 1, 3, 2, 2, 1, 1, 1, 1, + reg = qbman_set_swp_cfg(dqrr_size, wn, 1, 3, 2, 2, 1, 1, 1, 1, 1, 1); qbman_cinh_write(s, QBMAN_CINH_SWP_CFG, reg); reg = qbman_cinh_read(s, QBMAN_CINH_SWP_CFG); diff --git a/drivers/bus/fslmc/qbman/qbman_sys_decl.h b/drivers/bus/fslmc/qbman/qbman_sys_decl.h index f82bb18..5640b04 100644 --- a/drivers/bus/fslmc/qbman/qbman_sys_decl.h +++ b/drivers/bus/fslmc/qbman/qbman_sys_decl.h @@ -15,6 +15,7 @@ /****************/ /* arch assists */ /****************/ +#if defined(RTE_ARCH_ARM64) #define dcbz(p) { asm volatile("dc zva, %0" : : "r" (p) : "memory"); } #define lwsync() { asm volatile("dmb st" : : : "memory"); } #define dcbf(p) { asm volatile("dc cvac, %0" : : "r"(p) : "memory"); } @@ -28,3 +29,11 @@ static inline void prefetch_for_store(void *p) { asm volatile("prfm pstl1keep, [%0, #0]" : : "r" (p)); } +#elif defined(RTE_ARCH_ARM) +#define dcbz(p) memset(p, 0, 64) +#define lwsync() { asm volatile("dmb st" : : : "memory"); } +#define dcbf(p) RTE_SET_USED(p) +#define dccivac(p) RTE_SET_USED(p) +#define prefetch_for_load(p) { asm volatile ("pld [%0]" : : "r" (p)); } +#define prefetch_for_store(p) { asm volatile ("pld [%0]" : : "r" (p)); } +#endif