From: Will Deacon <will@kernel.org>
To: Thierry Reding <thierry.reding@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>
Cc: Maulik Shah <mkshah@codeaurora.org>,
Jason Cooper <jason@lakedaemon.net>,
Saravana Kannan <saravanak@google.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Catalin Marinas <catalin.marinas@arm.com>,
lkml <linux-kernel@vger.kernel.org>,
Lina Iyer <ilina@codeaurora.org>,
iommu@lists.linux-foundation.org, Vinod Koul <vkoul@kernel.org>,
Andy Gross <agross@kernel.org>,
John Stultz <john.stultz@linaro.org>,
linux-gpio@vger.kernel.org, Marc Zyngier <maz@kernel.org>,
linux-arm-msm@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Jon Hunter <jonathanh@nvidia.com>,
Kalle Valo <kvalo@codeaurora.org>, Todd Kjos <tkjos@google.com>
Subject: Re: [PATCH v6 3/3] firmware: QCOM_SCM: Allow qcom_scm driver to be loadable as a permenent module
Date: Mon, 16 Nov 2020 16:36:03 +0000 [thread overview]
Message-ID: <20201116163603.GA30507@willie-the-truck> (raw)
In-Reply-To: <20201116155936.GE2224373@ulmo>
On Mon, Nov 16, 2020 at 04:59:36PM +0100, Thierry Reding wrote:
> On Fri, Nov 06, 2020 at 04:27:10AM +0000, John Stultz wrote:
> > diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
> > index 7be48c1bec96d..6f431b73e617d 100644
> > --- a/drivers/firmware/qcom_scm.c
> > +++ b/drivers/firmware/qcom_scm.c
> > @@ -1280,6 +1280,7 @@ static const struct of_device_id qcom_scm_dt_match[] = {
> > { .compatible = "qcom,scm" },
> > {}
> > };
> > +MODULE_DEVICE_TABLE(of, qcom_scm_dt_match);
> >
> > static struct platform_driver qcom_scm_driver = {
> > .driver = {
> > @@ -1295,3 +1296,6 @@ static int __init qcom_scm_init(void)
> > return platform_driver_register(&qcom_scm_driver);
> > }
> > subsys_initcall(qcom_scm_init);
> > +
> > +MODULE_DESCRIPTION("Qualcomm Technologies, Inc. SCM driver");
> > +MODULE_LICENSE("GPL v2");
> > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> > index 04878caf6da49..c64d7a2b65134 100644
> > --- a/drivers/iommu/Kconfig
> > +++ b/drivers/iommu/Kconfig
> > @@ -248,6 +248,7 @@ config SPAPR_TCE_IOMMU
> > config ARM_SMMU
> > tristate "ARM Ltd. System MMU (SMMU) Support"
> > depends on ARM64 || ARM || (COMPILE_TEST && !GENERIC_ATOMIC64)
> > + depends on QCOM_SCM || !QCOM_SCM #if QCOM_SCM=m this can't be =y
> > select IOMMU_API
> > select IOMMU_IO_PGTABLE_LPAE
> > select ARM_DMA_USE_IOMMU if ARM
>
> This, in conjunction with deferred probe timeout, causes mayhem on
> Tegra186. The problem, as far as I can tell, is that there are various
> devices that are hooked up to the ARM SMMU, but if ARM SMMU ends up
> being built as a loadable module, then those devices will initialize
> without IOMMU support (because deferred probe will timeout before the
> ARM SMMU module can be loaded from the root filesystem).
>
> Unfortunately, the ARM SMMU module will eventually end up being loaded
> once the root filesystem has been mounted (for example via SDHCI or
> Ethernet, both with using just plain, non-IOMMU-backed DMA API) and then
> initialize, configuring as "fault by default", which then results from a
> slew of SMMU faults from all the devices that have previously configured
> themselves without IOMMU support.
I wonder if fw_devlink=on would help here?
But either way, I'd be more inclined to revert this change if it's causing
problems for !QCOM devices.
Linus -- please can you drop this one (patch 3/3) for now, given that it's
causing problems?
Cheers,
Will
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2020-11-16 16:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-06 4:27 [PATCH v6 1/3] pinctrl: qcom: Kconfig: Rework PINCTRL_MSM to be a depenency rather then a selected config John Stultz
2020-11-06 4:27 ` [PATCH v6 2/3] pinctrl: qcom: Allow pinctrl-msm code to be loadable as a module John Stultz
2020-11-10 13:34 ` Linus Walleij
2020-11-06 4:27 ` [PATCH v6 3/3] firmware: QCOM_SCM: Allow qcom_scm driver to be loadable as a permenent module John Stultz
2020-11-10 13:35 ` Linus Walleij
2020-11-10 18:51 ` John Stultz
2020-11-12 17:37 ` Will Deacon
2020-11-12 19:17 ` John Stultz
2020-11-16 15:59 ` Thierry Reding
2020-11-16 16:36 ` Will Deacon [this message]
2020-11-16 19:48 ` John Stultz
2020-11-17 13:47 ` Thierry Reding
2020-11-19 9:33 ` Will Deacon
2020-11-23 12:35 ` Linus Walleij
2020-11-23 13:06 ` Will Deacon
2020-11-16 19:40 ` John Stultz
2020-11-10 13:33 ` [PATCH v6 1/3] pinctrl: qcom: Kconfig: Rework PINCTRL_MSM to be a depenency rather then a selected config Linus Walleij
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=20201116163603.GA30507@willie-the-truck \
--to=will@kernel.org \
--cc=agross@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=gregkh@linuxfoundation.org \
--cc=ilina@codeaurora.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jason@lakedaemon.net \
--cc=john.stultz@linaro.org \
--cc=jonathanh@nvidia.com \
--cc=kvalo@codeaurora.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=mkshah@codeaurora.org \
--cc=saravanak@google.com \
--cc=tglx@linutronix.de \
--cc=thierry.reding@gmail.com \
--cc=tkjos@google.com \
--cc=vkoul@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).