Skip to content

Commit 1650620

Browse files
cwabbott0willdeacon
authored andcommitted
iommu/arm-smmu-qcom: Enable threaded IRQ for Adreno SMMUv2/MMU500
The recommended flow for stall-on-fault in SMMUv2 is the following: 1. Resolve the fault. 2. Write to FSR to clear the fault bits. 3. Write RESUME to retry or fail the transaction. MMU500 is designed with this sequence in mind. For example, experimentally we have seen on MMU500 that writing RESUME does not clear FSR.SS unless the original fault is cleared in FSR, so 2 must come before 3. FSR.SS is allowed to signal a fault (and does on MMU500) so that if we try to do 2 -> 1 -> 3 (while exiting from the fault handler after 2) we can get duplicate faults without hacks to disable interrupts. However, resolving the fault typically requires lengthy operations that can stall, like bringing in pages from disk. The only current user, drm/msm, dumps GPU state before failing the transaction which indeed can stall. Therefore, from now on we will require implementations that want to use stall-on-fault to also enable threaded IRQs. Do that with the Adreno MMU implementations. Signed-off-by: Connor Abbott <cwabbott0@gmail.com> Link: https://lore.kernel.org/r/20250520-msm-gpu-fault-fixes-next-v8-1-fce6ee218787@gmail.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent 3318f7b commit 1650620

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,7 @@ static const struct arm_smmu_impl qcom_adreno_smmu_v2_impl = {
585585
.alloc_context_bank = qcom_adreno_smmu_alloc_context_bank,
586586
.write_sctlr = qcom_adreno_smmu_write_sctlr,
587587
.tlb_sync = qcom_smmu_tlb_sync,
588+
.context_fault_needs_threaded_irq = true,
588589
};
589590

590591
static const struct arm_smmu_impl qcom_adreno_smmu_500_impl = {
@@ -594,6 +595,7 @@ static const struct arm_smmu_impl qcom_adreno_smmu_500_impl = {
594595
.alloc_context_bank = qcom_adreno_smmu_alloc_context_bank,
595596
.write_sctlr = qcom_adreno_smmu_write_sctlr,
596597
.tlb_sync = qcom_smmu_tlb_sync,
598+
.context_fault_needs_threaded_irq = true,
597599
};
598600

599601
static struct arm_smmu_device *qcom_smmu_create(struct arm_smmu_device *smmu,

0 commit comments

Comments
 (0)