[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ae34ca46-8699-bdc7-7d5c-c402e75be97d@arm.com>
Date: Fri, 9 Mar 2018 17:36:31 +0000
From: Robin Murphy <robin.murphy@....com>
To: Tomasz Figa <tfiga@...omium.org>
Cc: Vivek Gautam <vivek.gautam@...eaurora.org>,
Joerg Roedel <joro@...tes.org>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Will Deacon <will.deacon@....com>,
Rob Clark <robdclark@...il.com>,
"open list:IOMMU DRIVERS" <iommu@...ts.linux-foundation.org>,
devicetree@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
jcrouse@...eaurora.org, Stephen Boyd <sboyd@...eaurora.org>,
Sricharan R <sricharan@...eaurora.org>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Archit Taneja <architt@...eaurora.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>
Subject: Re: [PATCH v8 3/5] iommu/arm-smmu: Invoke pm_runtime during probe,
add/remove device
[ +Lorenzo ]
On 09/03/18 04:50, Tomasz Figa wrote:
[...]
>>> Now we need a way to do the check. Perhaps for the time being it would
>>> be enough to just check for the power-domains property in DT?
>>
>>
>> AFAICS, it might be as simple as arm_smmu_probe() doing this:
>>
>> /*
>> * We want to avoid touching dev->power.lock in fastpaths unless
>> * it's really going to do something useful - pm_runtime_enabled()
>> * can serve as an ideal proxy for that decision.
>> */
>> if (dev->pm_domain)
>> pm_runtime_enable(dev);
>>
>> or maybe even just gate all the calls with "if (smmu->dev.pm_domain)"
>> directly (like pcie-mediatek does), but I'm not sure which would be
>> conceptually cleaner.
>
> Okay, that was easier than I expected. Thanks. :)
>
> Actually, there is one more thing that might need rechecking. Are you
> sure that dev->pm_domain is NULL for the devices, for which we don't
> want runtime PM to be enabled? I think ACPI was mentioned and ACPI
> includes the concept of PM domains.
Thanks for pointing that out - thankfully, I've confirmed that the SMMUs
on my Juno don't have dev->pm_domain set when booting with ACPI, and
double-checking the ACPI code I think we're OK here. Since the SMMUs are
only described in the static IORT table and not in the ACPI namespace,
they won't have the ACPI companion device that acpi_dev_pm_attach()
looks for, and thus should always be ignored. Lorenzo, do I have that right?
Robin.
Powered by blists - more mailing lists