Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp571575pxv; Thu, 22 Jul 2021 07:14:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKi+8SMewom9qUHiI5Z8rw2w9eI/0UtD4YTYfMVz+0DO7shG1xI+X5imQ1DznmEa0GYu3G X-Received: by 2002:a17:907:f98:: with SMTP id kb24mr106226ejc.554.1626963266562; Thu, 22 Jul 2021 07:14:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626963266; cv=none; d=google.com; s=arc-20160816; b=kLWUNQNbH0ebybgW/zoCbrwX67neB1hk0dMKa9m7ekujR7Xq9zWv+Krw/L/4R+ShZ0 cWrApnnFBhhx7Kfq7p351b3f7TZ1YaX4C+BXe06QF5ljY7u2VKVt4C5WqZkoPkl8l8s8 UXMWONE8uBayIfnJIYLz9nmLFrieyzxgRaXVk7ZNKa4bf84bMLdrrfRS+NQ79LOmDE5k W++T8nO18fBK3P2f8M+YRwjkkyjYXc4EOC3d+BxFpMEiKf3SXoDxTh+jfw+audq+525H 6uHhXaEJvbEND/qbn7BTnafNbhaBcYCqMj/7VyNBcahrTiZGj97lEW0LPAvOjAEKoaWU R5/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dZgFgZhrs56HsZOM/C619SE70241t2ZoGy4zbM9FRQw=; b=Rzka1W5Kxkc14gW+xudHpsUywfo8B6VWVqEdjQ8/LDJXzs/27PeJA/q4mN1g3QS2tK hoBkIVKD0nl/HCNYXb3cNwbwlWd8BrKxqI1L8oPUOeoDJHlILdF8VKusUW550EqfI6/i shXv0aLXvXIIi3Xj2a/zoW0Uiglcll4vwoS0gqGPJKDTybYtSYMv4V70VrCJ7Ftnxvu9 SueiOfDfmslPNgMnGbjOqpxHjd3hBbwpT6k5yZN3A83ImOkaf3JhJyK5ODLgnHw94Qg2 j/Mt8jYP6gL4zINzHM3LXVHeYJltbujMDZ06BhzkVIrY7QH6Sd7azcyfmOIP4peFdd1i 4n2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nEyoEueB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h18si22166039eds.154.2021.07.22.07.13.57; Thu, 22 Jul 2021 07:14:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nEyoEueB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232271AbhGVN3b (ORCPT + 99 others); Thu, 22 Jul 2021 09:29:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:40182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232105AbhGVN3a (ORCPT ); Thu, 22 Jul 2021 09:29:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 79B956100C; Thu, 22 Jul 2021 14:10:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626963005; bh=Zng5weqblYORm27hewy/vtF2ESUwu4tN0uaPT0saZ9Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nEyoEueBim62N99t9Q6ZzZsWX0NuxoabhK09ERdSN44HbtRH7e0GHYn2+u31oS/ox Ac3NLpSBOTzk2cNo0KgCiOUAIL3VZAyF+r2KOmfQGwNHbwM5NAFrwBluy2eTXDNggI 9ERNOBPO3vX7gbtQ77lNr+5lJbSU8JW4HLnTlBz6hErLRPVmqzpIJNS/X5w7fg/5/o HVxh9PeB8gTIgkzdgcKwoGaZOcq8/wT9jmaqMt3seBAiCjetUaqBJ5liBDAivos+bU 0HmliRIHDIXkxT+2m3ktORso0PimaSlrX925vwNT2Ezpx9AQdukJ597mNYsQKbCVqf stmr8JGOmituw== Date: Thu, 22 Jul 2021 19:40:01 +0530 From: Vinod Koul To: Sanjay R Mehta Cc: Sanjay R Mehta , gregkh@linuxfoundation.org, dan.j.williams@intel.com, Thomas.Lendacky@amd.com, Shyam-sundar.S-k@amd.com, Nehal-bakulchandra.Shah@amd.com, robh@kernel.org, mchehab+samsung@kernel.org, davem@davemloft.net, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org Subject: Re: [PATCH v10 0/3] Add support for AMD PTDMA controller driver Message-ID: References: <1624207298-115928-1-git-send-email-Sanju.Mehta@amd.com> <5dd9b34f-3e12-6ca1-1d4d-ddc3f82e341f@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5dd9b34f-3e12-6ca1-1d4d-ddc3f82e341f@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22-07-21, 19:27, Sanjay R Mehta wrote: > > > On 6/20/2021 10:11 PM, Sanjay R Mehta wrote: > > From: Sanjay R Mehta > > > > This patch series add support for AMD PTDMA controller which > > performs high bandwidth memory-to-memory and IO copy operation, > > performs DMA transfer through queue based descriptor management. > > > > AMD Processor has multiple ptdma device instances with each controller > > having single queue. The driver also adds support for for multiple PTDMA > > instances, each device will get an unique identifier and uniquely > > named resources. > > > > v10: > > - modified ISR to return IR_HANDLED only in non-error condition. > > - removed unnecessary prints, variables and made some cosmetic changes. > > - removed pt_ordinal atomic variable and instead using dev_name() > > for device name. > > - removed the cmdlist dependency and instead using vc.desc_issued list. > > - freeing the desc and list which was missing in the pt_terminate_all() > > funtion. > > - Added comment for marking PTDMA as DMA_PRIVATE. > > - removed unused pt_debugfs_lock from debufs code. > > - keeping same file permision for all the debug directoris. > > > > v9: > > - Modified the help message in Kconfig as per Randy's comment. > > - reverted the split of code for "pt_handle_active_desc" as there > > was driver hang being observerd after few iterations. > > > > v8: > > - splitted the code into different functions, one to find active desc > > and second to complete and invoke callback. > > - used FIELD_PREP & FIELD_GET instead of union struct bitfields. > > - modified all style fixes as per the comments. > > > > v7: > > - Fixed module warnings reported ( by kernel test robot ). > > > > v6: > > - Removed debug artifacts and made the suggested cosmetic changes. > > - implemented and used to_pt_chan and to_pt_desc inline functions. > > - Removed src and dst address check as framework does this. > > - Removed devm_kcalloc() usage and used devm_kzalloc() api. > > - Using framework debugfs directory to store dma info. > > > > v5: > > - modified code to submit next tranction in ISR itself and removed the tasklet. > > - implemented .device_synchronize API. > > - converted debugfs code by using DEFINE_SHOW_ATTRIBUTE() > > - using dbg_dev_root for debugfs root directory. > > - removed dma_status from pt_dma_chan > > - removed module parameter cmd_queue_lenght. > > - removed global device list for multiple devics. > > - removed code related to dynamic adding/deleting to device list > > - removed pt_add_device and pt_del_device functions > > > > v4: > > - modified DMA channel and descriptor management using virt-dma layer > > instead of list based management. > > - return only status of the cookie from pt_tx_status > > - copyright year changed from 2019 to 2020 > > - removed dummy code for suspend & resume > > - used bitmask and genmask > > > > v3: > > - Fixed the sparse warnings. > > > > v2: > > - Added controller description in cover letter > > - Removed "default m" from Kconfig > > - Replaced low_address() and high_address() functions with kernel > > API's lower_32_bits & upper_32_bits(). > > - Removed the BH handler function pt_core_irq_bh() and instead > > handling transaction in irq handler itself. > > - Moved presetting of command queue registers into new function > > "init_cmdq_regs()" > > - Removed the kernel thread dependency to submit transaction. > > - Increased the hardware command queue size to 32 and adding it > > as a module parameter. > > - Removed backlog command queue handling mechanism. > > - Removed software command queue handling and instead submitting > > transaction command directly to > > hardware command queue. > > - Added tasklet structure variable in "struct pt_device". > > This is used to invoke pt_do_cmd_complete() upon receiving interrupt > > for command completion. > > - pt_core_perform_passthru() function parameters are modified and it is > > now used to submit command directly to hardware from dmaengine framew > > - Removed below structures, enums, macros and functions, as these value > > constants. Making command submission simple, > > - Removed "union pt_function" and several macros like PT_VERSION, > > PT_BYTESWAP, PT_CMD_* etc.. > > - enum pt_passthru_bitwise, enum pt_passthru_byteswap, enum pt_memty > > struct pt_dma_info, struct pt_data, struct pt_mem, struct pt_passt > > struct pt_op, > > > > Links of the review comments for v10: > > 1. https://lkml.org/lkml/2021/6/8/976 > > 2. https://lkml.org/lkml/2021/6/16/7 > > 3. https://lkml.org/lkml/2021/6/16/65 > > 4. https://lkml.org/lkml/2021/6/16/192 > > 5. https://lkml.org/lkml/2021/6/16/273 > > 6. https://lkml.org/lkml/2021/6/8/1698 > > 7. https://lkml.org/lkml/2021/6/16/8 > > 8. https://lkml.org/lkml/2021/6/9/808 > > > > Links of the review comments for v7: > > 1. https://lkml.org/lkml/2020/11/18/351 > > 2. https://lkml.org/lkml/2020/11/18/384 > > > > Links of the review comments for v5: > > 1. https://lkml.org/lkml/2020/7/3/154 > > 2. https://lkml.org/lkml/2020/8/25/431 > > 3. https://lkml.org/lkml/2020/7/3/177 > > 4. https://lkml.org/lkml/2020/7/3/186 > > > > Links of the review comments for v5: > > 1. https://lkml.org/lkml/2020/5/4/42 > > 2. https://lkml.org/lkml/2020/5/4/45 > > 3. https://lkml.org/lkml/2020/5/4/38 > > 4. https://lkml.org/lkml/2020/5/26/70 > > > > Links of the review comments for v4: > > 1. https://lkml.org/lkml/2020/1/24/12 > > 2. https://lkml.org/lkml/2020/1/24/17 > > > > Links of the review comments for v2: > > 1https://lkml.org/lkml/2019/12/27/630 > > 2. https://lkml.org/lkml/2020/1/3/23 > > 3. https://lkml.org/lkml/2020/1/3/314 > > 4. https://lkml.org/lkml/2020/1/10/100 > > > > Links of the review comments for v1: > > 1. https://lkml.org/lkml/2019/9/24/490 > > 2. https://lkml.org/lkml/2019/9/24/399 > > 3. https://lkml.org/lkml/2019/9/24/862 > > 4. https://lkml.org/lkml/2019/9/24/122 > > > > Sanjay R Mehta (3): > > dmaengine: ptdma: Initial driver for the AMD PTDMA > > dmaengine: ptdma: register PTDMA controller as a DMA resource > > dmaengine: ptdma: Add debugfs entries for PTDMA > > > > MAINTAINERS | 6 + > > drivers/dma/Kconfig | 2 + > > drivers/dma/Makefile | 1 + > > drivers/dma/ptdma/Kconfig | 13 ++ > > drivers/dma/ptdma/Makefile | 10 + > > drivers/dma/ptdma/ptdma-debugfs.c | 110 ++++++++++ > > drivers/dma/ptdma/ptdma-dev.c | 327 ++++++++++++++++++++++++++++++ > > drivers/dma/ptdma/ptdma-dmaengine.c | 389 ++++++++++++++++++++++++++++++++++++ > > drivers/dma/ptdma/ptdma-pci.c | 245 +++++++++++++++++++++++ > > drivers/dma/ptdma/ptdma.h | 334 +++++++++++++++++++++++++++++++ > > 10 files changed, 1437 insertions(+) > > create mode 100644 drivers/dma/ptdma/Kconfig > > create mode 100644 drivers/dma/ptdma/Makefile > > create mode 100644 drivers/dma/ptdma/ptdma-debugfs.c > > create mode 100644 drivers/dma/ptdma/ptdma-dev.c > > create mode 100644 drivers/dma/ptdma/ptdma-dmaengine.c > > create mode 100644 drivers/dma/ptdma/ptdma-pci.c > > create mode 100644 drivers/dma/ptdma/ptdma.h > > Hi Vinod, Greg, > > > I had re-sent this patch series as per your advice a month ago with all > the review feedback's addressed. > > Need your guidance and feedback to get this code reviewed and up-streamed. This was sent during the merge window... and right now this is in my review queue and will be addressed shortly. -- ~Vinod