[PATCH v3 05/13] iommu/arm-smmu-v3: Allocate IOPF queue without FEAT_SVA

Jonathan Cameron jonathan.cameron at oss.qualcomm.com
Thu Sep 3 12:18:33 PDT 2026


> arm_smmu_init_queues() currently allocates smmu->evtq.iopf only when both
> FEAT_SVA and FEAT_STALLS are advertised by the SMMU. The FEAT_SVA gate is
> unnecessary: iopf_queue_alloc() is a plain workqueue allocator with no SVA
> dependency, and FEAT_STALLS alone can produce events that need IOPF.
> 
> On HW with FEAT_STALLS but no FEAT_SVA, a master with the "dma-can-stall"
> device-tree property has master->stall_enabled set at probe. Then also with
> CONFIG_ARM_SMMU_V3_SVA=y, arm_smmu_enable_iopf() sees stall_enabled, calls
> iopf_queue_add_device(NULL, ...) at fault-handling domain attach, which now
> oopses on mutex_lock(&queue->lock).

When you say 'now' you mean after other patches in this series?
If so then I'd make that more explicit.  If not, drop the 'now'.

> 
> Drop the FEAT_SVA term so the IOPF workqueue is allocated whenever the SMMU
> can produce IOPF events, and select IOMMU_IOPF from ARM_SMMU_V3 as well, so
> iopf_queue_alloc() has a real implementation instead of the NULL-returning
> stub when CONFIG_ARM_SMMU_V3_SVA is unset.
> 
> IOPF is orthogonal to SVA anyway. So, drop the CONFIG_ARM_SMMU_V3_SVA gates
> in arm_smmu_enable_iopf() and arm_smmu_disable_iopf().
> 
> Fixes: 395ad89d11fd9 ("iommu/arm-smmu-v3: Add stall support for platform devices")
> Cc: stable at vger.kernel.org # v5.14
> Assisted-by: Claude:claude-opus-4-8
> Signed-off-by: Nicolin Chen <nicolinc at nvidia.com>
>
You had me at the IOPF and SVA being orthogonal part.

Reviewed-by: Jonathan Cameron <jonathan.cameron at oss.qualcomm.com>

-- 
Jonathan Cameron <jonathan.cameron at oss.qualcomm.com>



More information about the linux-arm-kernel mailing list