[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240517163742.GA525@willie-the-truck>
Date: Fri, 17 May 2024 17:37:42 +0100
From: Will Deacon <will@...nel.org>
To: Douglas Anderson <dianders@...omium.org>
Cc: Robin Murphy <robin.murphy@....com>, Joerg Roedel <joro@...tes.org>,
Stephen Boyd <swboyd@...omium.org>, Chen Lin <chen45464546@....com>,
iommu@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iommu/arm-smmu: Don't disable next-page prefetcher on
devices it works on
Hi Doug,
On Mon, May 13, 2024 at 04:13:47PM -0700, Douglas Anderson wrote:
> On sc7180 trogdor devices we get a scary warning at bootup:
> arm-smmu 15000000.iommu:
> Failed to disable prefetcher [errata #841119 and #826419], check ACR.CACHE_LOCK
>
> We spent some time trying to figure out how we were going to fix these
> errata and whether we needed to do a firmware update. Upon closer
> inspection, however, we realized that the errata don't apply to us.
> Specifically, the errata document says that for these errata:
> * Found in: r0p0
> * Fixed in: r2p2
>
> ...and trogdor devices appear to be running r2p4. That means that they
> are unaffected despite the scary warning.
>
> The issue is that the kernel unconditionally tries to disable the
> prefetcher even on unaffected devices and then warns when it's unable
> to.
>
> Let's change the kernel to only disable the prefetcher on affected
> devices, which will get rid of the scary warning on devices that are
> unaffected. As per the comment the prefetcher is
> "not-particularly-beneficial" but it shouldn't hurt to leave it on for
> devices where it doesn't cause problems.
>
> Fixes: f87f6e5b4539 ("iommu/arm-smmu: Warn once when the perfetcher errata patch fails to apply")
> Signed-off-by: Douglas Anderson <dianders@...omium.org>
> ---
>
> drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 21 +++++++++++++--------
> 1 file changed, 13 insertions(+), 8 deletions(-)
Just curious, but did you see any performance impact (good or bad) as a
result of this patch? The next-page prefetcher has always looked a little
naive to me and, with a tendency for tiny TLBs in some implementations,
there's a possibility it could do more harm than good.
Will
Powered by blists - more mailing lists