From patchwork Fri Dec 8 05:21:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121117 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp228795qgn; Thu, 7 Dec 2017 21:22:48 -0800 (PST) X-Google-Smtp-Source: AGs4zMa8v6ZKJrcZRidVFD3y0hvQwcG8oK3Rh73XbWOowQgcv8Pt8ji1KCnwVR4ZClDrRJLiDpfl X-Received: by 10.223.138.246 with SMTP id z51mr25977160wrz.152.1512710567971; Thu, 07 Dec 2017 21:22:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512710567; cv=none; d=google.com; s=arc-20160816; b=IzCQuZIcivUrowUxWWFZlL+fL3wqLRdgvmK7ak3zcqJsPzQ/5xwJ/nOYyAsp/1etiG As9odBxxwyRlih/DtbQ1U32c7UkfdeZrprAsHaGEnEvDMasHkPd47qkFyYStsp5jHdtq uPrpkLUZhkGJ6JIS7mKjpwJoz5ydgYMNrOzMz7UB6HNhK0IryvmGVbqXjuyVqqx2s2y9 ZVlkm9879I+25JRhlVP+nrV9GMO4NPhoHRRsdNXIUR+9PmiKXgBKxOZ/685r9W+guz6n e4ArMASZy1Z1gy5FFJXSTsxeNMJ+FinxUeIqGE3JCgofDG/4OzN9A/o88s3bgPH3zYsb NePg== 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:arc-authentication-results; bh=CjOVYyaXb4GuVeiazrbU9Wcd+qIJBQBhfjzoOKLLht0=; b=wQ3tYO0NiY/UxMjg3BPaBSK165V+qS7nQblp+KEK6Udv5rY67vukrXWe6wTC6pWl3T RmKr693GKTsBNCN6ACTjpErfiWUsxc3pZi/4zAeQZuTuhUT3aedkoeDflBYoja1w32ms DGyUU7+gBmpObdKVtpRD5Z/BUObr5nULRdHTaW6gsjEzFPulaTkvQZUebRy00Tqt0VYv YpTwrZ3lVSEutxbFm1Po+RVzoDBkJVlBAdXBR0Fhn1HDM/dwn2xdH7AcHG/4IEhN01MD 1XCi3p228u5WjNRzXWp6IX7BMULLiGR0LezW4lsHCcMweeLusDpwkjsOU4tb4yKcsucq g+CA== ARC-Authentication-Results: i=1; mx.google.com; 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 p75si5178627wrc.194.2017.12.07.21.22.47; Thu, 07 Dec 2017 21:22:47 -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; 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 8C1A2199A9; Fri, 8 Dec 2017 06:22:33 +0100 (CET) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0065.outbound.protection.outlook.com [104.47.42.65]) by dpdk.org (Postfix) with ESMTP id 6125B271; Fri, 8 Dec 2017 06:22:31 +0100 (CET) Received: from BLUPR0301CA0007.namprd03.prod.outlook.com (2a01:111:e400:5259::17) by SN2PR03MB2366.namprd03.prod.outlook.com (2603:10b6:804:e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Fri, 8 Dec 2017 05:22:29 +0000 Received: from BY2FFO11FD024.protection.gbl (2a01:111:f400:7c0c::121) by BLUPR0301CA0007.outlook.office365.com (2a01:111:e400:5259::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:29 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD024.mail.protection.outlook.com (10.1.15.213) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 8 Dec 2017 05:22:26 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vB85MKGZ013022; Thu, 7 Dec 2017 22:22:26 -0700 From: Hemant Agrawal To: CC: , , Santosh Shukla , Date: Fri, 8 Dec 2017 10:51:15 +0530 Message-ID: <1512710487-32388-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841467114895; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(336005)(346002)(39380400002)(39860400002)(376002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(86362001)(50226002)(8936002)(6666003)(2950100002)(104016004)(5660300001)(85426001)(8656006)(6916009)(2906002)(68736007)(48376002)(81156014)(33646002)(50466002)(81166006)(51416003)(8676002)(97736004)(77096006)(76176011)(305945005)(16586007)(2351001)(296002)(316002)(356003)(47776003)(53936002)(54906003)(106466001)(4326008)(105606002)(36756003)(498600001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2366; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD024; 1:yamBrLcFdOlJVYCP48+A/2bOV98idxXuDRgFFa1KF0y9xzbddNP0UWgdpQTmrPHwu8nzdxJo3oeRxqnKuLhB4qwwSdqzbF21B82mEE0Lf1GyAzNTQe2tPKfIikI3AOKu MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2b8f4b5f-920b-4c59-658f-08d53dfbab8e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:SN2PR03MB2366; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2366; 3:x1ha+NqK+gkEiZJ29j3f+8Wndp4lv84K92rm5cggHBxcqsdHTsrHlMviORH99y6nhhXY0ToTrXl2Xr0+RMAfAdNrP9XsAcKTOw0FtFd3tg91KwE7MvJZ1M46cl/pfyIUi9wQ0f8zTCbaJaXFXJ6q54XvyPqfPe4lrz597BiIE6ay7DgOehnvesMEXfNavgXMKjZo4MN6k4hHjPn/Eu5Tbt4GKVNm6rR6JCCTy1o8Sk+BKYtmAW6H+KgNyVhhsG7vlNagsB+wzFB5jW9ZTQI9R72WKQa6/nynfqjvYT1yXEWPjEUXARFNgX+h4lzQWHT9VuK9g0RrP0aV6tr12+4enqCaIKNwr/xqxs/hmAxNRIw=; 25:4ClPL3czptdwUKurGf6q63w6yD+JSvAwlVAUhnveoWTnuxfcZZFuRzfOYw/dSMMlg9fk4eJycB7gtOXEsqCpu1wEeqo2D28BOtZgxJoXm0K4Dlm0egefJAFgLyYqjj0dngwGx/svs2rckFVkJI8bmFZ3xqHsHrbVCEkkgbSAGcsJibUpnFMvfm8CSNQ3YT9fzv0/GbFGrpMN6rdRiPq5WeHmUgiqyNOWRCbuXXmnPJD3vGlOPphv62tT9Y+DELlqda4zf2Hp0e35PP4m/B808dFUpwxQJj8zJYV2V/qn7PyNTZKtfdRbhSgkOM8eovFslidBhSasbxlzkEIHgfy0jw== X-MS-TrafficTypeDiagnostic: SN2PR03MB2366: X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2366; 31:AfSuimphxoB4MzaWWJTzrpn2AWVD/qM/mmdzM3DQoKWGnRIurK/AV+cIn4HUhnFtcUceqKrR/b7oSDXLD9RofGknY3FE/YnC7XvG7MxtK0G08X5bSGbmPRYhARixhL2Jl2Wx8XfyuSAvagXy1GxRRMac/6ojDbfZsA3Ku+R3HU2wuuNVrBUtiXkGRZSHy8a6BVBSRg0KC0oXkvBziHMm+jVrUwgH+wh4+OIQmzYC9n4=; 4:uZ7XkNMh4nl3JxrDkgjbP5xVT1U8W960z7zBli777opXG9UzsvGlZhRRd+BA/k48Lyl8wcNnFu+dqipa8cBOCSYFesr37biEnug6F7wrhASRffbqB3oHYBnLQH9LxX+kcNVuaoLwbyHj5UzadZ98CMExbEwePU7vxVv14N2uHY5xyFL2amhb+g0W7sbocIUmKCSygyZNIrlaFqmda94pbxN1RgZXPh3to4maky6jnbYHjSKOXXnDsg7eSkqTWs8fO5I9lrZpqAtCyntECCJczWE1uti/3aa4diVoJOrC7G/FmgSgHFmJf0DEa3SZnruXWg7MuiZ8+OL0pXuXjqESme04HwOX6pu9Gy5j+WEiJ4M= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3231022)(10201501046)(93006095)(93001095)(3002001)(6055026)(6096035)(20161123565025)(20161123561025)(20161123559100)(20161123556025)(20161123563025)(201703131430075)(201703131520075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(201708071742011); SRVR:SN2PR03MB2366; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:SN2PR03MB2366; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2366; 23:PBKwJC+70XxWtMhTPFvbgxeDm0nUa2tUbPpio/d7O?= pQsQAUS7kiYxEG+XwzqoCtEkWUQHkKPfjzHmdcnlf67w+Pj/kbTKydMZm8V0+m15Q5o3vfLnC1mG8DpDL+FB5EcZBag2xoY8qVr4/qWSypEhnHvT/tL2I4/YpI2EUialvIDJZVta5qN2ewZoOFa03WWelpkSIvV3OalJyqyOwruUuardwg9oplEK8hEpf98qE4qUx48+mGVKfJ47CGaf9SYPVhTYitnPkx09auNvIn2MjW8weUxJPrOyuDl9HV8EGP55muA0ZayfxYnpWlAX1W1q4z9LjbLMwOEGTltr8UfZLchq1YLnh41mQyBy3IJI3tyg4GEg8L2K9i/lx++CoB2ZMEhIoTOlRWCinpXCmFJR2YnRvhy8e5SbSJzIH4MnLixAxuvJGTe15lbF4D/qnmHhrHYfy3S/SIebHv3twq8fFTqYav7bM+diR/b9ojJXY+kDl00mpgYKefByIUO3a3qpA5WST5miqymJteMTQBbAhsuxV5VD+nsOtlGGqZ/7PBUmIAhOrKuzku/jTMSZ/Yan/DFZhj8taz5baHxl6ai29lN4kgRDD8M3V6wiuDR1c1YqBYVf1SBffdVLvMgPTYdrGzF6kjXxQkUEKq76OH9BNDWyiLTmG7O6YPaVtlzSW1pABDhZUTvBM+Ki+zt4om5cHK0ACKNybgAOXqD68LsuyR+48jyFEx82svdgANUCxdu7yQxPH6j7Bh6SrsxlZDUmrnNyjLGIOCerClAY9lgMLQreRrRjrUYQuRd33mHxeYmacT0A6bU1pO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1sfxxVh5pUT62OCa0D7qONxiaTUV7vfsY5dW+Ty0OZqmfXgITyzdGLy30QR8GWC87kLyXHyGPOOqarxf4gCPbx6tHMXT/ai0siEI1GxZwyYqkA2VA7mAmLE8ITMqhjr/U30cZeLVF/zxN1kqSExjINLA6gQYooiWB6fuLZoE3gsV5n36QWRUl6Mz1vh SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 05:22:26.5086 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2b8f4b5f-920b-4c59-658f-08d53dfbab8e X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR03MB2366 Subject: [dpdk-dev] [PATCH 02/14] drivers: change the deprecated memseg physaddr to iova 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" DPAA and DPAA2 drivers were using memseg physaddr, which has been deprecated. Fixes: 7ba49d39f14c ("mem: rename segment address from physical to IOVA") Cc: Santosh Shukla Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/rte_dpaa_bus.h | 6 +++--- drivers/bus/fslmc/fslmc_vfio.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 8 ++++---- drivers/crypto/dpaa_sec/dpaa_sec.c | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) -- 2.7.4 Acked-by: Santosh Shukla diff --git a/drivers/bus/dpaa/rte_dpaa_bus.h b/drivers/bus/dpaa/rte_dpaa_bus.h index eafc944..bc933af 100644 --- a/drivers/bus/dpaa/rte_dpaa_bus.h +++ b/drivers/bus/dpaa/rte_dpaa_bus.h @@ -113,10 +113,10 @@ static inline void *rte_dpaa_mem_ptov(phys_addr_t paddr) int i; for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr != NULL; i++) { - if (paddr >= memseg[i].phys_addr && paddr < - memseg[i].phys_addr + memseg[i].len) + if (paddr >= memseg[i].iova && paddr < + memseg[i].iova + memseg[i].len) return (uint8_t *)(memseg[i].addr) + - (paddr - memseg[i].phys_addr); + (paddr - memseg[i].iova); } return NULL; diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index 25c87ad..e47215c 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -249,7 +249,7 @@ int rte_fslmc_vfio_dmamap(void) dma_map.size = memseg[i].len; dma_map.vaddr = memseg[i].addr_64; #ifdef RTE_LIBRTE_DPAA2_USE_PHYS_IOVA - dma_map.iova = memseg[i].phys_addr; + dma_map.iova = memseg[i].iova; #else dma_map.iova = dma_map.vaddr; #endif diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index c1b842f..ece1a7d 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -284,10 +284,10 @@ static void *dpaa2_mem_ptov(phys_addr_t paddr) int i; for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) { - if (paddr >= memseg[i].phys_addr && - (char *)paddr < (char *)memseg[i].phys_addr + memseg[i].len) + if (paddr >= memseg[i].iova && + (char *)paddr < (char *)memseg[i].iova + memseg[i].len) return (void *)(memseg[i].addr_64 - + (paddr - memseg[i].phys_addr)); + + (paddr - memseg[i].iova)); } return NULL; } @@ -301,7 +301,7 @@ static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr) for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) { if (vaddr >= memseg[i].addr_64 && vaddr < memseg[i].addr_64 + memseg[i].len) - return memseg[i].phys_addr + return memseg[i].iova + (vaddr - memseg[i].addr_64); } return (phys_addr_t)(NULL); diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 16155b1..438dd3b 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -121,7 +121,7 @@ dpaa_mem_vtop(void *vaddr) for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) { if (vaddr_64 >= memseg[i].addr_64 && vaddr_64 < memseg[i].addr_64 + memseg[i].len) { - paddr = memseg[i].phys_addr + + paddr = memseg[i].iova + (vaddr_64 - memseg[i].addr_64); return (rte_iova_t)paddr; @@ -137,10 +137,10 @@ dpaa_mem_ptov(rte_iova_t paddr) int i; for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) { - if (paddr >= memseg[i].phys_addr && - (char *)paddr < (char *)memseg[i].phys_addr + memseg[i].len) + if (paddr >= memseg[i].iova && + (char *)paddr < (char *)memseg[i].iova + memseg[i].len) return (void *)(memseg[i].addr_64 + - (paddr - memseg[i].phys_addr)); + (paddr - memseg[i].iova)); } return NULL; }