From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Marcin Wojtas <mw@semihalf.com>,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, gregory.clement@bootlin.com,
sebastian.hesselbarth@gmail.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, hch@lst.de, kabel@kernel.org,
jaz@semihalf.com
Subject: Re: [PATCH] ARM: dts: armada-38x: Mark devices as dma-coherent
Date: Sun, 23 Oct 2022 17:20:48 +0100 [thread overview]
Message-ID: <Y1Vp4BdC50o9roKe@shell.armlinux.org.uk> (raw)
In-Reply-To: <Y1VX4RtzKQZHe/oO@lunn.ch>
On Sun, Oct 23, 2022 at 05:04:01PM +0200, Andrew Lunn wrote:
> On Sun, Oct 23, 2022 at 01:40:24AM +0200, Marcin Wojtas wrote:
> > Armada 38x platforms marks all devices as coherent via
> > mvebu_hwcc_notifier(), whereas the standard way to determine
> > this is by of_dma_is_coherent(). Reflect the hardware
> > capabilities by adding 'dma-coherent' properties to the device tree.
>
> Hi Marcin
>
> Does this need to go to -rc for 6.0? The DMA issues being reported?
> If so, please add a Fixed: tag.
Are we absolutely sure this makes sense?
Looking at atch/arm/mach-mvebu/coherency.c, there are dependencies
on stuff such as whether the kernel is in SMP mode or not (because
the page tables need to be appropriately marked as shared for
coherency with IO to work). We only enable the shared bit if we're
in SMP mode because (a) its difficult to do at runtime due to TLB
conflicts (requires switching the MMU off, rewriting the page tables
and switching the MMU back on), and (b) setting the shared bit for
CPUs that don't need it _can_ result in the CPUs basically bypassing
their caches and thus kill system performance.
So, if we have Armada 38x platforms that are operated in uniprocessor
mode, this patch can cause havoc on such a setup.
I would suggest utmost caution with this approach.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2022-10-23 16:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-22 23:40 [PATCH] ARM: dts: armada-38x: Mark devices as dma-coherent Marcin Wojtas
2022-10-23 15:04 ` Andrew Lunn
2022-10-23 16:20 ` Russell King (Oracle) [this message]
2022-10-23 21:30 ` Marcin Wojtas
2022-10-24 6:51 ` Marek Behún
2022-10-24 7:51 ` Russell King (Oracle)
2022-10-24 9:11 ` Marcin Wojtas
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=Y1Vp4BdC50o9roKe@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=devicetree@vger.kernel.org \
--cc=gregory.clement@bootlin.com \
--cc=hch@lst.de \
--cc=jaz@semihalf.com \
--cc=kabel@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mw@semihalf.com \
--cc=robh+dt@kernel.org \
--cc=sebastian.hesselbarth@gmail.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;
as well as URLs for NNTP newsgroup(s).