From: Eli Billauer <eli.billauer@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: gregkh <gregkh@linuxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Subject: Re: [PATCH] char: xillybus: Eliminate redundant wrappers to DMA related calls
Date: Mon, 27 Sep 2021 18:34:40 +0300 [thread overview]
Message-ID: <6151E490.4020403@gmail.com> (raw)
In-Reply-To: <CAK8P3a3C+a9-hg4nbFFHR4i6e5HmchD4ZgmijJLs5RLBaCBsBQ@mail.gmail.com>
On 27/09/21 10:47, Arnd Bergmann wrote:
>> +static void xilly_sync_for_device(struct xilly_endpoint *ep,
>> > + dma_addr_t dma_handle,
>> > + size_t size,
>> > + int direction)
>> > +{
>> > + if (ep->make_sync_calls)
>> > + dma_sync_single_for_device(ep->dev, dma_handle,
>> > + size, direction);
>> > +}
>>
> These wrappers should not even be needed. When the device is
> marked as coherent in DT, the dma_sync_*() calls are supposed
> to do nothing, in a relatively efficient way. I would not expect
> the extra conditional to give you any measurable performance
> benefit over what you get normally, and it should not make a
> functional difference either.
>
> Can you remove the inlines and the ->make_sync_calls flag?
>
>
Thanks, I had no idea that the sync functions neutralize themselves this
way. That is, since commit 591c1ee465ce ("of: configure the platform
device dma parameters") from back in April 2014.
So indeed, I shall remove the the @make_sync_calls entry and related
wrapper functions, and resubmit an second version of this patch.
Thanks again,
Eli
prev parent reply other threads:[~2021-09-27 15:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-26 7:29 [PATCH] char: xillybus: Eliminate redundant wrappers to DMA related calls eli.billauer
2021-09-27 7:47 ` Arnd Bergmann
2021-09-27 15:34 ` Eli Billauer [this message]
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=6151E490.4020403@gmail.com \
--to=eli.billauer@gmail.com \
--cc=arnd@arndb.de \
--cc=christophe.jaillet@wanadoo.fr \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.