public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Nishanth Menon <nm@ti.com>, Nikhil Devshatwar <nikhil.nd@ti.com>
Cc: Tero Kristo <t-kristo@ti.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm64: dts: ti: k3-am65: mark dss as dma-coherent
Date: Mon, 2 Nov 2020 13:01:34 +0000	[thread overview]
Message-ID: <59747093-4171-937d-70a3-ce6ee788cf79@arm.com> (raw)
In-Reply-To: <8532a1c0-29db-d67a-441f-b58b232f7c98@ti.com>

On 2020-10-30 14:08, Tomi Valkeinen wrote:
> On 29/10/2020 16:52, Nishanth Menon wrote:
>> On 20:11-20201029, Nikhil Devshatwar wrote:
>>> On 16:11-20201029, Tomi Valkeinen wrote:
>>>> DSS is IO coherent on AM65, so we can mark it as such with
>>>> 'dma-coherent' property in the DT file.
>>>>
>>>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
>>> Acked-by: Nikhil Devshatwar <nikhil.nd@ti.com>
>>>
>>
>> Tomi: Do you need to add Fixes: tag to percolate this to stable? if
>> yes, please comment, makes it easier for me to queue for 5.10 if
>> possible
> 
> I don't see this as a fix, but an optimization. Nothing is broken without this.

Note that if the driver doesn't have explicit control over what type of 
memory access the device makes, that's not necessarily true.

If coherent DMA buffers are allocated from regular kernel memory, 
there's still a cacheable alias kicking around that can be speculatively 
fetched into a cache somewhere. If the device is genuinely non-coherent, 
or configured to make non-snooping accesses, then that's not an issue, 
but it it's hard-wired to make snooping accesses it can start hitting 
that cached alias and not see subsequent updates to the buffer, since 
those are written straight to RAM via the non-cacheable mapping. At that 
point it becomes an actual problem (and it's not just theoretical - 
we've hit a real-world example of this recently with GPUs on certain 
Amlogic devices).

Robin.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-11-02 13:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29 14:11 [PATCH] arm64: dts: ti: k3-am65: mark dss as dma-coherent Tomi Valkeinen
2020-10-29 14:41 ` Nikhil Devshatwar
2020-10-29 14:52   ` Nishanth Menon
2020-10-30 14:08     ` Tomi Valkeinen
2020-11-02 13:01       ` Robin Murphy [this message]
2020-11-02 13:42         ` Tomi Valkeinen
2020-11-02 16:46           ` Nishanth Menon

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=59747093-4171-937d-70a3-ce6ee788cf79@arm.com \
    --to=robin.murphy@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=nikhil.nd@ti.com \
    --cc=nm@ti.com \
    --cc=t-kristo@ti.com \
    --cc=tomi.valkeinen@ti.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