From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Steven Price <steven.price@arm.com>, Christoph Hellwig <hch@lst.de>
Cc: Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Robin Murphy <robin.murphy@arm.com>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Magnus Karlsson <magnus.karlsson@intel.com>,
<nex.sw.ncis.osdt.itp.upstreaming@intel.com>,
<bpf@vger.kernel.org>, <netdev@vger.kernel.org>,
<iommu@lists.linux.dev>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dma: fix DMA sync for drivers not calling dma_set_mask*()
Date: Thu, 9 May 2024 17:16:13 +0200 [thread overview]
Message-ID: <6ce428e6-3585-4ef5-af08-debef0a7c308@intel.com> (raw)
In-Reply-To: <ce83b3b8-2246-4006-a111-f2da0740bd8e@arm.com>
From: Steven Price <steven.price@arm.com>
Date: Thu, 9 May 2024 16:11:26 +0100
> On 09/05/2024 15:46, Alexander Lobakin wrote:
>> There are several reports that the DMA sync shortcut broke non-coherent
>> devices.
>> dev->dma_need_sync is false after the &device allocation and if a driver
>> didn't call dma_set_mask*(), it will still be false even if the device
>> is not DMA-coherent and thus needs synchronizing. Due to historical
>> reasons, there's still a lot of drivers not calling it.
>> Invert the boolean, so that the sync will be performed by default and
>> the shortcut will be enabled only when calling dma_set_mask*().
>>
>> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> Closes: https://lore.kernel.org/lkml/46160534-5003-4809-a408-6b3a3f4921e9@samsung.com
>> Reported-by: Steven Price <steven.price@arm.com>
>> Closes: https://lore.kernel.org/lkml/010686f5-3049-46a1-8230-7752a1b433ff@arm.com
>> Fixes: 32ba8b823252 ("dma: avoid redundant calls for sync operations")
>> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
>
> Tested-by: Steven Price <steven.price@arm.com>
Thank!
>
> Thanks for the quick fix.
>
> Note that the fixes hash (32ba8b823252) is not the one in linux-next -
> that's f406c8e4b770. If the branch is getting rebased then no problem, I
> just thought I should point that out.
Oh crap, it really should be f406. Wrong tree again >_<
Chris, would you fix it when applying or I should resend?
>
> Thanks,
> Steve
Thanks,
Olek
next prev parent reply other threads:[~2024-05-09 15:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240509144704eucas1p2fe6bfb07a9b39f548e7db0f24e47eb0a@eucas1p2.samsung.com>
2024-05-09 14:46 ` [PATCH] dma: fix DMA sync for drivers not calling dma_set_mask*() Alexander Lobakin
2024-05-09 15:11 ` Steven Price
2024-05-09 15:16 ` Alexander Lobakin [this message]
2024-05-09 15:19 ` Christoph Hellwig
2024-05-09 15:27 ` Marek Szyprowski
2024-05-10 7:12 ` Przemek Kitszel
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=6ce428e6-3585-4ef5-af08-debef0a7c308@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=bpf@vger.kernel.org \
--cc=edumazet@google.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=nex.sw.ncis.osdt.itp.upstreaming@intel.com \
--cc=rafael@kernel.org \
--cc=robin.murphy@arm.com \
--cc=steven.price@arm.com \
--cc=will@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 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).