public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Chen <peter.chen@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Sanket Parmar <sparmar@cadence.com>,
	pawell@cadence.com, a-govindraju@ti.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	kurahul@cadence.com, gregkh@linuxfoundation.org, kishon@ti.com
Subject: Re: [PATCH v2] usb: cdns3: Optimize DMA request buffer allocation
Date: Sat, 20 Mar 2021 17:07:26 +0800	[thread overview]
Message-ID: <20210320090726.GA28364@b29397-desktop> (raw)
In-Reply-To: <20210318073245.GA645121@infradead.org>

On 21-03-18 07:32:45, Christoph Hellwig wrote:
> On Wed, Mar 17, 2021 at 08:13:59PM +0100, Sanket Parmar wrote:
> > dma_alloc_coherent() might fail on the platform with a small
> > DMA region.
> > 
> > To avoid such failure in cdns3_prepare_aligned_request_buf(),
> > dma_alloc_coherent() is replaced with dma_alloc_noncoherent()
> > to allocate aligned request buffer of dynamic length.
> > 
> > Reported-by: Aswath Govindraju <a-govindraju@ti.com>
> > Signed-off-by: Sanket Parmar <sparmar@cadence.com>
> 
> Looks good to me:
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Hi Christoph,

I would like to confirm the dma_alloc_noncoherent allocates the memory
less than PAGE_SIZE if buffer size it would like to allocate is small
(eg, 64 bytes)? 

-- 

Thanks,
Peter Chen


  reply	other threads:[~2021-03-20 11:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 19:13 [PATCH v2] usb: cdns3: Optimize DMA request buffer allocation Sanket Parmar
2021-03-18  7:32 ` Christoph Hellwig
2021-03-20  9:07   ` Peter Chen [this message]
2021-03-20  9:08 ` Peter Chen
2021-03-22 10:30   ` Sanket Parmar

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=20210320090726.GA28364@b29397-desktop \
    --to=peter.chen@kernel.org \
    --cc=a-govindraju@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=kishon@ti.com \
    --cc=kurahul@cadence.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pawell@cadence.com \
    --cc=sparmar@cadence.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox