[PATCH v3 07/13] iommu/arm-smmu-v3: Disable the queue IRQs before disabling the SMMU
Jonathan Cameron
jonathan.cameron at oss.qualcomm.com
Thu Sep 3 12:18:33 PDT 2026
> The EVTQ, PRIQ and combined IRQ handlers are threaded and issue commands of
> their own, e.g. a CMDQ_OP_PRI_RESP for a page request. Disabling the SMMU
> while one is in flight hands that command to a queue consuming nothing, so
> its poll waits out a full timeout.
>
> Two paths disable the SMMU while those IRQs are still requested: a failing
> arm_smmu_device_reset() returns to a probe that disables the device itself,
> and arm_smmu_disable_action() covers an unbind or any later probe failure.
> Both can run after arm_smmu_setup_irqs() requested the IRQs.
>
> Disable those IRQs first in both paths, so that no handler is left running
> once the SMMU goes down.
Why this soluton rather than a flag to stop them queuing new work + a
synchronize_irq() to deal with threads in flight.
irq disables always worry me a little as they tend to be patching over
something nastier. I think this works though so I'm not going to
strongly object.
--
Jonathan Cameron <jonathan.cameron at oss.qualcomm.com>
More information about the linux-arm-kernel
mailing list