[PATCH v8 11/12] iommu/arm-smmu-v3: Invoke pm_runtime before hw access
Pranjal Shrivastava
praan at google.com
Mon Jun 1 23:24:46 PDT 2026
On Mon, Jun 01, 2026 at 10:51:34PM -0700, Nicolin Chen wrote:
> On Tue, Jun 02, 2026 at 03:59:52AM +0000, Pranjal Shrivastava wrote:
> > On Mon, Jun 01, 2026 at 05:24:18PM -0700, Nicolin Chen wrote:
> > > On Mon, Jun 01, 2026 at 09:59:08PM +0000, Pranjal Shrivastava wrote:
> > > > -static inline bool arm_smmu_can_elide(struct arm_smmu_device *smmu)
> > > > +static inline bool arm_smmu_cmdq_can_elide(struct arm_smmu_device *smmu)
> > > > {
> > > > return !!Q_STOP(READ_ONCE(smmu->cmdq.q.llq.prod));
> > > > }
> > >
> > > Can it be named perfectly at the beginning?
> >
> > Ack.
> >
> > >
> > > And again, should it check Q_STOP in vcmdq?
> >
> > I don't think so.. the primary CMDQ's STOP_FLAG should act as a proxy for
> > the SMMU's global power state. Since all queues (primary and secondary)
> > are gated synchronously during suspend after SMMUEN=0, and ungated before
> > SMMUEN=1 (i.e.before the caching can begin). Checking the primary queue
> > should suffice..
>
> Should leave a note inline to elaborate why we only check primary
> cmdq only.
Ack.
>
> [...]
> > We can also decide to drop the can_elide checks from invs_array and
> > atc_inv_master altogether, leaving gerror & page_response the only
> > remaining call-sites, both of which don't use secondary queues.
>
> That's not true.. In the host mode, any command will be issued to
> vcmdq. IOW, primary queue might not be used at all.
>
Alright, I see the supports_cmd is a Guest-only thing. I'll add not to
the can_elide helper.
Praan
More information about the linux-arm-kernel
mailing list