From patchwork Wed Jan 3 06:42:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Appana Durga Kedareswara rao X-Patchwork-Id: 10141757 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2E19D6034B for ; Wed, 3 Jan 2018 06:43:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2837728F66 for ; Wed, 3 Jan 2018 06:43:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1753B28F70; Wed, 3 Jan 2018 06:43:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8481528F6E for ; Wed, 3 Jan 2018 06:43:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vH5j19AH9q6yw1wDCDIUzWSCE/mLJTOZS1qtKeMOQU8=; b=FZpiPIykthnkMJ Rrb7sfweP5J8F35fNLbn13yKkTdkg/zSJhHavvYNwUB8RcRwntbwSouZcb964YSaCQ0o1ILW5o4Rz Sf9AI0luFZY2O/1BCBmzJE4Dn8hcsJ4Pk5+qNmn9PZwMpvAudTDRmN6SRgzi3Aw5SL6J51z4TeyhK 7ub2kI+mpqc4tZ+KbwwNby/gJu8fAs7fj66oPp9wv7fcziTspwT9SF8XbvRJGOf2nNNbXCkyfbpY4 tjtfgmk7vo/VHSziBA7OekX4DfQTL6i+7rXocYCWWMYYfT3CL89nRjlJ+g3YZCHqBT2aerP2EXGwu YKC5yHsesujUK59r+RKw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eWcmF-0006qA-Mb; Wed, 03 Jan 2018 06:43:51 +0000 Received: from mail-cys01nam02on0060.outbound.protection.outlook.com ([104.47.37.60] helo=NAM02-CY1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eWcks-0005tx-Lv for linux-arm-kernel@lists.infradead.org; Wed, 03 Jan 2018 06:42:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=kD10rA5phEKpu3E4xouY3qEYwUo5rxpPKl5h6Kw1ros=; b=LcTb0gjenNkjrThvLyX42Ak1+/dZ/bBKB37slY1W6gERSyO5n1YNv1VHFbQ/SxebOuWOROXBE12ohQI0jgsr4kP1VFG3En0qs0xvb0Us/SKe6E1eveIN5RpEyqm4zdcstACpPbN95GjoYpFl7inAfpVqT9wb2q2UBtjqa1gBx80= Received: from CY4PR02CA0015.namprd02.prod.outlook.com (10.169.188.25) by CY4PR02MB3382.namprd02.prod.outlook.com (10.165.89.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.366.8; Wed, 3 Jan 2018 06:42:12 +0000 Received: from SN1NAM02FT007.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::207) by CY4PR02CA0015.outlook.office365.com (2603:10b6:903:18::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.386.5 via Frontend Transport; Wed, 3 Jan 2018 06:42:12 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by SN1NAM02FT007.mail.protection.outlook.com (10.152.72.88) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Wed, 3 Jan 2018 06:42:11 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:35570 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1eWckd-0004F8-60; Tue, 02 Jan 2018 22:42:11 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1eWckc-0006Sw-U8; Tue, 02 Jan 2018 22:42:11 -0800 Received: from xsj-pvapsmtp01 (xsj-pvapsmtp01.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w036g9CS011828; Tue, 2 Jan 2018 22:42:09 -0800 Received: from [172.23.37.94] (helo=ubuntu.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1eWcka-0006Pm-Jb; Tue, 02 Jan 2018 22:42:09 -0800 From: Kedareswara rao Appana To: , , , , , , , , Subject: [PATCH v2 4/4] dmaengine: xilinx_dma: Free BD consistent memory Date: Wed, 3 Jan 2018 12:12:11 +0530 Message-ID: <1514961731-1916-5-git-send-email-appanad@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514961731-1916-1-git-send-email-appanad@xilinx.com> References: <1514961731-1916-1-git-send-email-appanad@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23568.006 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(39380400002)(376002)(39860400002)(346002)(2980300002)(438002)(199004)(189003)(8936002)(7416002)(36386004)(107886003)(50226002)(4326008)(47776003)(39060400002)(356003)(81166006)(478600001)(2906002)(5660300001)(9786002)(106466001)(6666003)(81156014)(2950100002)(8676002)(106002)(50466002)(16586007)(48376002)(77096006)(63266004)(316002)(54906003)(2201001)(36756003)(110136005)(51416003)(76176011)(305945005)(59450400001)(7696005)(107986001)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR02MB3382; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT007; 1:ouyx1gCRRko3cHpB+tZSLEKCkM40tGbSkAQUI4PfNzd1W2yc5lAffi//tC11jdOeo0fvkqpFqlfZRqTgTf2tBtaxzo3AGNvobXkStNzVkweQtP+C1A4QQvA6w2zVd5DA MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8aa887f7-4753-4442-75cc-08d552751ec7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(4608076)(2017052603307)(7153060); SRVR:CY4PR02MB3382; X-Microsoft-Exchange-Diagnostics: 1; CY4PR02MB3382; 3:53GxQqqrAKvQZnlejINe0Az8lUXmmpMHplKu1bFHnFVdB6eJPSS2bqIpKcV83BkZvNBGha5F9z70kUE4o1kkQ5neUE8uWEVYOr93sek6uzJ7FW0Wdso+QLgkgj8KmDpvONs/s3pXfBlhmvN9eNjWKWcc2xAyoaVJiXOsWcXUG73FDEAtCHXWUTf5hdoG0dTDXEqpP2aMPW7/wtJABHsgLPa9zYr40h/ye9V0/+gzcgYvcGnbQyumgAQEnh1UtEJ4esylcXDSbaHoM8YdY19Qe00RJQ7Io7DvwV7FCHys1aTdi8fvvYC6FzFct4gDlqCr1b3qf/N4BLZUxBogTEpD7sp4P5xX4GjhEYIH9jGQkEQ=; 25:yFN5AWILvT3wo9KKfMJHTPErpuOJ7OIAfyfeKRCr6GxcCLZF1bA+8K7rMhqmtCJPW6MneNHjsbJmAmXhPPTxyFFuLwLjipcddx0cMJpzoDFlngVV+oCSsk0hGkBZh8qpqX5SJVUMV9NgkI8IYalVz2spD5nLpiBmvlpy1Dc5rybyl0bAJLQrEdWKhTvW+a5EY8eHDbB+rQ+b7e+6QEhVokfYdJOBiU0QgCG8R6MvLhkU8PgIrEG3le9JFZ9zveVsnyGe5+FhiSVMl1q5J20d/2mf14gmFpAV07kZAlCNbPlGiokBhr0ryvlOve1TrqDbbsjYWM4koU8dJMzRAYxzWg== X-MS-TrafficTypeDiagnostic: CY4PR02MB3382: X-Microsoft-Exchange-Diagnostics: 1; CY4PR02MB3382; 31:12JE8k4lRo9c6ZBlz6UlhZ17dYTVqgWJVwnm8MIteZX+YhoOITUlEhod9yg0Gbs63XyHysimCVgV5xB/y8wxLNOqXjbb4oqdnaSXBlt+kmIb8kx8ICmaYxpa6VrWBZqj0hpBEHA6/7pqnUGuib9chkgYqDwMQEdXDdjoKVv6BKVM6k6+PUCHdRrc61QMa56OPaYTFgv3sTPf6m84Cg8S/y3b+oTlVFEbbibFdZ/fPbE=; 20:eghqR2YgUFJlGy32Cu4fnQZDdvXRi3gwlK4zY8JUHC4SlclOSrIb/E1W6qg+v+N3uRHK4eUzARfwZyfYO9SHaNZWc6PAZKvWsJRpf7yrzBs/zCRRf5WP1sUFmyxm8w86CO/SPubDP+EyxkOlmV2mvmbLlwj9F4VkCRdLSK8G4HPS5Y9oBsccGMAndQUdwtACp4cSwfgxQjKerTA7txDsP8RHnet9CS6TlBpgj+umGqfFr7vyY/2QH8aqlUxTRcIBT4k1PAW01z2k9aWg4qt+DPvvAZW82q4Ipj1WN7nwhvGNUQAeqar1lmAzl3c8JxILDJzfwc6kZCeOW806JUR4UW16hmM3a8JmO1kozqFVy1zQKYDcpbNfF/LovG+M2/sil9fofLUx/X0Yo7tPm1h6bWBFs8eaTkGOcYtKUgX8dKVPLmHXdePL4S0uwcr2V9XE2pc2LrrDjREXaUqncDxs+t/9lw0+QRUSbK6IIUjPMhdrX+XUMWnd2JpKNbDX2oVM X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(3231023)(944501075)(93006095)(93004095)(10201501046)(6055026)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:CY4PR02MB3382; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR02MB3382; X-Microsoft-Exchange-Diagnostics: 1; CY4PR02MB3382; 4:TWNHnHyXAnrq3TICGQlDlIpI2qDjlnwGOE4754M/S52p+hZdrEZeB1gdYsjKNYsDxppFAf/+c44RPiLcOqqM/7hHD6ZOO4b+kV789/wkywCF+DGPdKh95RT1e5wAzpMkV2n2fiHjWXgMfkwuWY2u9/0JLEQ9EjMCeDE/lZZUE6rOcvLFgyr0Nx2b7Qukq0TCvH+CE4X2kx8mEpleI4+xXhFbDuf27ClrAKfvDxbMT5Kqv8F3RnuNjBPLA6dz2qTGEWZhz3nWdPto/BekvnF+UltgsvHd9mAZA/6btAD9b86oATDd2q6inXAND5OCLbs1 X-Forefront-PRVS: 0541031FF6 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR02MB3382; 23:IEqMN66i7Ar9uplTjnUQ9BT7mQqgL+h/rlu1rIxAs?= =?us-ascii?Q?eyfSN4gIWMNwOfw2AewUQzc38fvbI2leylqeG7zYHv38R97ZRBct1IROxSOi?= =?us-ascii?Q?9Ye4BltHmCSfJgLB52hEGUcKOx0nQ4WI4RtZpHsCVlnrZUffUgjDrgZ56gAF?= =?us-ascii?Q?UYHjfddEWbwDl5Wv+wZILuzNLDdh8NFTixTa7V21G63Y9DbJvNKKCk92v0Ju?= =?us-ascii?Q?T6HfidTnosXA3C35PdpNOOnOoRI7lE3USYPQ48udtCZH09esSDoI+TutqdbO?= =?us-ascii?Q?m5Auv3+FKorQmeeSSvR97FCPUnf8K1SYI20BSCyMBUKSPHYVJS63tjs7MBMU?= =?us-ascii?Q?hi14IppylLXH+zreREg91llbr7gndv2oXYQZthxQQQbw3OJ0fKgfSDwXUfcY?= =?us-ascii?Q?gNeweV1SbUM5dOQV4mLswnRqxuLra/7zIiYtEoNJ1G3CWm541kNEK7+MS5xb?= =?us-ascii?Q?z0twZUz7f0Ca3CI5R+lfIJAiNnLluYhSGK1T4azr0oXlJHMkFyDzGfCrOfFR?= =?us-ascii?Q?/pHXmxePH8lVb43cEl6RLml0ppxwvg8jYSc1O6gjRBcqXHIcvnxgGEn0lNx8?= =?us-ascii?Q?fXz0Hr8gbSGdegwC3ZP34SCwgKQIb8WRgsRSBeyu6K7lkTVA36Zt97CsM/Ct?= =?us-ascii?Q?Ti4trHCLSMUw5e7l3kHkY4xng4Y1wADjyjk3O9QQ3/Ujg0/tI6AWmnInexCc?= =?us-ascii?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wOU=; 24:It6wB5MxwVt4RtUUr28bIdKEfYV4322Y7Bku8aE/oVszaMmAkyZptwM2qdhbwMUD/0FCxDgyJNNykOVKI2cSTS2QVvAwDsqZBHKdwJAvCqU=; 7:WHW1Wnz7RxT/Z3NtQF2prlvntHgdnmB+B9JcOZfGObbuuTwxMrhFho4EsPQw2lTsaEHtPqwiLyG2fB57chJq6rD1sbOe+/9tqH8u84uCDPqakjLJaCbXYATM0k5dXFeLTxLZEn6e/PvcZLj/RuJtZmsnTlSajVdxXh7OYZI0iuO8yrg7nKq9nny4fd2YITYUPo7qEDaJ2wUvRwPIbf/D7iOOlL1AFBUfxrAdzrQVgGRHs0NMp2ySUMkh29wFr9JR SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2018 06:42:11.9770 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8aa887f7-4753-4442-75cc-08d552751ec7 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR02MB3382 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180102_224227_455836_303B3DD8 X-CRM114-Status: UNSURE ( 6.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Radhey Shyam Pandey Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Free BD consistent memory while freeing the channel i.e in free_chan_resources. Signed-off-by: Radhey Shyam Pandey Signed-off-by: Kedareswara rao Appana --- Changes for v2: --> None. drivers/dma/xilinx/xilinx_dma.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index 845e638..a9edbd8 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -764,6 +764,11 @@ static void xilinx_dma_free_chan_resources(struct dma_chan *dchan) INIT_LIST_HEAD(&chan->free_seg_list); spin_unlock_irqrestore(&chan->lock, flags); + /* Free memory that is allocated for BD */ + dma_free_coherent(chan->dev, sizeof(*chan->seg_v) * + XILINX_DMA_NUM_DESCS, chan->seg_v, + chan->seg_p); + /* Free Memory that is allocated for cyclic DMA Mode */ dma_free_coherent(chan->dev, sizeof(*chan->cyclic_seg_v), chan->cyclic_seg_v, chan->cyclic_seg_p);