dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sanjay R Mehta <sanmehta@amd.com>
To: Vinod Koul <vkoul@kernel.org>, Sanjay R Mehta <Sanju.Mehta@amd.com>
Cc: 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 2/3] dmaengine: ptdma: register PTDMA controller as a DMA resource
Date: Thu, 29 Jul 2021 15:42:47 +0530	[thread overview]
Message-ID: <368f7d3e-bdb1-ea9f-de70-285280420706@amd.com> (raw)
In-Reply-To: <YQD19B4A/l/ZyySZ@matsya>



On 7/28/2021 11:45 AM, Vinod Koul wrote:
> [CAUTION: External Email]
> 
> On 20-06-21, 11:41, Sanjay R Mehta wrote:
>> From: Sanjay R Mehta <sanju.mehta@amd.com>
>>
>> Register ptdma queue to Linux dmaengine framework as general-purpose
>> DMA channels.
> 
> Mostly looks good, one question below:
> 
>> +static struct pt_dma_desc *pt_alloc_dma_desc(struct pt_dma_chan *chan,
>> +                                          unsigned long flags)
>> +{
>> +     struct pt_dma_desc *desc;
>> +
>> +     desc = kmem_cache_zalloc(chan->pt->dma_desc_cache, GFP_NOWAIT);
>> +     if (!desc)
>> +             return NULL;
>> +
>> +     vchan_tx_prep(&chan->vc, &desc->vd, flags);
>> +
>> +     desc->pt = chan->pt;
>> +     desc->issued_to_hw = 0;
>> +     desc->status = DMA_IN_PROGRESS;
> 
> where is this descriptor freed?
> 
This descriptor is freed in the pt_do_cleanup() function.
pt_do_cleanup() is set as a callback routine for "chan->vc.desc_free" in
the init code.

- Sanjay.

> --
> ~Vinod
> 

  reply	other threads:[~2021-07-29 10:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-20 16:41 [PATCH v10 0/3] Add support for AMD PTDMA controller driver Sanjay R Mehta
2021-06-20 16:41 ` [PATCH v10 1/3] dmaengine: ptdma: Initial driver for the AMD PTDMA Sanjay R Mehta
2021-07-28  5:55   ` Vinod Koul
2021-07-28  9:16     ` Sanjay R Mehta
2021-06-20 16:41 ` [PATCH v10 2/3] dmaengine: ptdma: register PTDMA controller as a DMA resource Sanjay R Mehta
2021-07-28  6:15   ` Vinod Koul
2021-07-29 10:12     ` Sanjay R Mehta [this message]
2021-06-20 16:41 ` [PATCH v10 3/3] dmaengine: ptdma: Add debugfs entries for PTDMA Sanjay R Mehta
2021-07-22 13:57 ` [PATCH v10 0/3] Add support for AMD PTDMA controller driver Sanjay R Mehta
2021-07-22 14:10   ` Vinod Koul
2021-07-22 14:32     ` Sanjay R Mehta
2021-07-22 14:19   ` Greg KH

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=368f7d3e-bdb1-ea9f-de70-285280420706@amd.com \
    --to=sanmehta@amd.com \
    --cc=Nehal-bakulchandra.Shah@amd.com \
    --cc=Sanju.Mehta@amd.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=Thomas.Lendacky@amd.com \
    --cc=dan.j.williams@intel.com \
    --cc=davem@davemloft.net \
    --cc=dmaengine@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+samsung@kernel.org \
    --cc=robh@kernel.org \
    --cc=vkoul@kernel.org \
    --subject='Re: [PATCH v10 2/3] dmaengine: ptdma: register PTDMA controller as a DMA resource' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

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