From: Will Deacon <will@kernel.org>
To: Robin Murphy <robin.murphy@arm.com>
Cc: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>,
linux-arm-msm@vger.kernel.org, Joerg Roedel <joro@8bytes.org>,
Jordan Crouse <jcrouse@codeaurora.org>,
iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
Rob Clark <robdclark@gmail.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] iomm/arm-smmu: Add stall implementation hook
Date: Thu, 7 May 2020 13:53:58 +0100 [thread overview]
Message-ID: <20200507125357.GA31783@willie-the-truck> (raw)
In-Reply-To: <1ced023b-157c-21a0-ac75-1adef7f029f0@arm.com>
On Thu, May 07, 2020 at 11:55:54AM +0100, Robin Murphy wrote:
> On 2020-05-07 11:14 am, Sai Prakash Ranjan wrote:
> > On 2020-04-22 01:50, Sai Prakash Ranjan wrote:
> > > Add stall implementation hook to enable stalling
> > > faults on QCOM platforms which supports it without
> > > causing any kind of hardware mishaps. Without this
> > > on QCOM platforms, GPU faults can cause unrelated
> > > GPU memory accesses to return zeroes. This has the
> > > unfortunate result of command-stream reads from CP
> > > getting invalid data, causing a cascade of fail.
>
> I think this came up before, but something about this rationale doesn't add
> up - we're not *using* stalls at all, we're still terminating faulting
> transactions unconditionally; we're just using CFCFG to terminate them with
> a slight delay, rather than immediately. It's really not clear how or why
> that makes a difference. Is it a GPU bug? Or an SMMU bug? Is this reliable
> (or even a documented workaround for something), or might things start
> blowing up again if any other behaviour subtly changes? I'm not dead set
> against adding this, but I'd *really* like to have a lot more confidence in
> it.
Rob mentioned something about the "bus returning zeroes" before, but I agree
that we need more information so that we can reason about this and maintain
the code as the driver continues to change. That needs to be a comment in
the driver, and I don't think "but android seems to work" is a good enough
justification. There was some interaction with HUPCF as well.
As a template, I'd suggest:
> > > diff --git a/drivers/iommu/arm-smmu.h b/drivers/iommu/arm-smmu.h
> > > index 8d1cd54d82a6..d5134e0d5cce 100644
> > > --- a/drivers/iommu/arm-smmu.h
> > > +++ b/drivers/iommu/arm-smmu.h
> > > @@ -386,6 +386,7 @@ struct arm_smmu_impl {
> > > int (*init_context)(struct arm_smmu_domain *smmu_domain);
> > > void (*tlb_sync)(struct arm_smmu_device *smmu, int page, int sync,
> > > int status);
/*
* Stall transactions on a context fault, where they will be terminated
* in response to the resulting IRQ rather than immediately. This should
* pretty much always be set to "false" as stalling can introduce the
* potential for deadlock in most SoCs, however it is needed on Qualcomm
* XXXX because YYYY.
*/
> > > + bool stall;
Hmm, the more I think about this, the more I think this is an erratum
workaround in disguise, in which case this could be better named...
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-05-07 12:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 20:20 [PATCH] iomm/arm-smmu: Add stall implementation hook Sai Prakash Ranjan
2020-05-07 10:14 ` Sai Prakash Ranjan
2020-05-07 10:55 ` Robin Murphy
2020-05-07 12:06 ` Sai Prakash Ranjan
2020-05-07 14:56 ` Robin Murphy
2020-05-07 12:53 ` Will Deacon [this message]
2020-05-08 15:32 ` Rob Clark
2020-05-08 15:40 ` Rob Clark
2020-05-11 17:30 ` Jordan Crouse
2020-05-18 15:45 ` Will Deacon
2020-05-19 9:26 ` Sai Prakash Ranjan
2020-05-19 15:11 ` Rob Clark
2020-05-20 9:32 ` Sai Prakash Ranjan
2020-05-20 12:59 ` Will Deacon
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=20200507125357.GA31783@willie-the-truck \
--to=will@kernel.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jcrouse@codeaurora.org \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@gmail.com \
--cc=robin.murphy@arm.com \
--cc=saiprakash.ranjan@codeaurora.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