Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751748AbeACGmU (ORCPT + 1 other); Wed, 3 Jan 2018 01:42:20 -0500 Received: from mail-cys01nam02on0086.outbound.protection.outlook.com ([104.47.37.86]:63359 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751690AbeACGmP (ORCPT ); Wed, 3 Jan 2018 01:42:15 -0500 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; From: Kedareswara rao Appana To: , , , , , , , , CC: , , , Radhey Shyam Pandey 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 Content-Type: text/plain 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?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YTb5E/jtnKPXzB6sco9BxrGedk1dcEwI+kFZi4zxt2sss+6Cnt5ehrAtHEtbxtjF1vf8ISTqkGL6vwqcOrC5jsDbv6y7WyVFlj35BWa2ci3WrUWtMO6yp2WZGCtYQSgZBmSjI40g/5Ee2bFVD1/4BjDtowqoenj7Z87/ysFZ/ACrmjTNyem3kEXoX8oLVH2ub4Uco=;5:jJFNjpScfHR99d3qBxilaFzvEpBYGjLMilaQADHuzAB7iG5cVNDN9cmVRX7Cx/LjS/xvHJDud0bq5GdH2+HY4w756Ca0IpD4Z+Lh7L4BMlENMCKTEn/5IbtyKn0289ka6oUASUWl7gwPIT3wljFlVk24Pz0udE6TWsne8+9LwOU=;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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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); -- 2.7.4