LKML Archive on
help / color / mirror / Atom feed
From: Sanjay R Mehta <>
To: <>
Cc: <>, <>,
	<>, <>,
	<>, <>,
	<>, <>,
	<>, <>,
	Sanjay R Mehta <>
Subject: [PATCH v11 0/3] Add support for AMD PTDMA controller driver
Date: Mon, 2 Aug 2021 05:32:52 -0500	[thread overview]
Message-ID: <> (raw)

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.

	- removed IRQ_NONE from irq handler as suggested by Vinod.
	- removed pt->name parameter and instead used "dev_name" in the
	- used register offsets instead of having pointer for each
	  registers as suggested by Vinod.
	- removed few unused variables.

	- 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()
	- 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.

	- 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.

	- 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.

	- Fixed module warnings reported ( by kernel test robot <> ).

	- 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.

	- 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

	- 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

        - Fixed the sparse warnings.

        - 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
        - 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:

Links of the review comments for v7:

Links of the review comments for v5:

Links of the review comments for v5:

Links of the review comments for v4:

Links of the review comments for v2:

Links of the review comments for v1:

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       | 308 ++++++++++++++++++++++++++++
 drivers/dma/ptdma/ptdma-dmaengine.c | 389 ++++++++++++++++++++++++++++++++++++
 drivers/dma/ptdma/ptdma-pci.c       | 243 ++++++++++++++++++++++
 drivers/dma/ptdma/ptdma.h           | 325 ++++++++++++++++++++++++++++++
 10 files changed, 1407 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


             reply	other threads:[~2021-08-02 10:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-02 10:32 Sanjay R Mehta [this message]
2021-08-02 10:32 ` [PATCH v11 1/3] dmaengine: ptdma: Initial driver for the AMD PTDMA Sanjay R Mehta
2021-08-02 14:37   ` kernel test robot
2021-08-02 10:32 ` [PATCH v11 2/3] dmaengine: ptdma: register PTDMA controller as a DMA resource Sanjay R Mehta
2021-08-02 10:32 ` [PATCH v11 3/3] dmaengine: ptdma: Add debugfs entries for PTDMA Sanjay R Mehta
2021-08-05 12:24   ` Greg KH
2021-08-05 13:25     ` Sanjay R Mehta
2021-08-02 10:36 ` [PATCH v11 0/3] Add support for AMD PTDMA controller driver Sanjay R Mehta
2021-08-05  5:40   ` Vinod Koul
2021-08-05  6:18     ` Sanjay R Mehta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH v11 0/3] Add support for AMD PTDMA controller driver' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).