Re: [PATCH v11 10/16] iommu/arm-smmu-v3: Factor out arm_smmu_handle_gerror()

From: Nicolin Chen

Date: Wed Sep 30 2026 - 17:57:08 EST


On Wed, Sep 30, 2026 at 08:00:31PM +0000, Pranjal Shrivastava wrote:
> On Wed, Sep 30, 2026 at 11:34:40AM -0700, Nicolin Chen wrote:
> > On Tue, Sep 29, 2026 at 03:45:04AM +0000, Pranjal Shrivastava wrote:
> > > The GERROR register's state might be lost when the SMMU is powered down
> > > during runtime suspend, requiring the suspend sequence to handle any
> > > pending errors before the hardware state is lost.
> > >
> > > Refactor the gerror handling logic into a helper function. Subsequent
> > > patches will invoke it from the runtime suspend callback after disabling
> > > the SMMU, ensuring that any late-breaking gerrors are logged and ack'ed
> > > before the hardware state is lost.
> >
> > CMDQV has a separate IRQ, so I think it likely needs a counterpart.
> >
> > I have a similar patch in one of my series:
> > https://lore.kernel.org/linux-iommu/16ae24cc2a002802b990afa1a69fe4ceab1e0da2.1790188510.git.nicolinc@xxxxxxxxxx/
> >
> > Mine only handles CMDQ error though..
> >
>
> I'll add a counterpart to arm_smmu_handle_gerror() in v12, I'll factor
> out the body of tegra241_cmdqv_isr() into something like
> tegra241_cmdqv_handle_errors() (bailing out early if VINTF_ERR_MAP is
> clear, so we don't warn on every suspend). The new impl->suspend op
> would call it after draining the lvcmdqs, with cmdqv->irq disabled
> around it, right before hw_deinit(vintf0).
>
> Since yours is for the CMD_SYNC timeout path, I'll keep this
> independent? WDYT?

I'm fine with the independent function for now.

Nicolin