[PATCH v8 11/12] iommu/arm-smmu-v3: Invoke pm_runtime before hw access
Daniel Mentz
danielmentz at google.com
Wed Jun 10 10:13:25 PDT 2026
On Tue, Jun 9, 2026 at 1:11 PM Pranjal Shrivastava <praan at google.com> wrote:
>
> On Tue, Jun 09, 2026 at 11:34:42AM -0700, Daniel Mentz wrote:
> > On Tue, Jun 9, 2026 at 3:34 AM Pranjal Shrivastava <praan at google.com> wrote:
> > > > I'm not sure if I have a good suggestion here. Have you considered the
> > > > following: Do not call arm_smmu_handle_gerror() from
> > > > arm_smmu_runtime_suspend(). Instead, call disable_irq() at the end of
> > > > the suspend handler (and enable_irq() at the beginning of the resume
> > > > handler)?
> > >
> > > I thought about using disable_irq(), but I think doing it at the
> > > hardware level (IRQ_CTRL) is better.
> > >
> > > By disabling in IRQ_CTRL and keeping the manual arm_smmu_handle_gerror()
> > > call at the end of suspend, we ensure that we don't lose any gerror info
> > > We catch and handle any errors that occurred during the drain/quiesce
> > > phase right before the power-down.
> >
> > I think the beauty of disable_irq() is that it synchronizes any
> > potentially running hard IRQ handler, which helps avoid races.
>
> Alright, I guess we could:
>
> 1. SMMUEN=0
> 2. IRQ_CTRL.gerror=0
Should we call arm_smmu_disable_irqs() here?
> 3. disable_irq();
> 4. handle_gerror(); at the end of suspend
More information about the linux-arm-kernel
mailing list