iommu/arm-smmu: fix out of bound iova fault handling
qsmmuv500_iova_to_phys checks for out of bound iova and skips ECATS
operations. While this is optimal, this also skips resuming stalled CB.
As part of S1 context fault handling iova_to_phys is followed by tlb
invalidation and sync. With context bank in stall state, the sync
operation will timeout.
Example:
arm-smmu: FAR = 0x000102325429beb4
arm-smmu: PAR = 0x0000000000000000
arm-smmu: FSR = 0x40000402 [TF R SS ]
arm-smmu: ECATS: address out of bounds: 0x000102325429beb4
arm-smmu: ECATS: address out of bounds: 0x000102325429beb4
arm-smmu: TLB sync timed out -- SMMU may be deadlocked
Call trace:
qsmmuv500_tlb_sync_timeout+0x360
__arm_smmu_tlb_sync+0x2b4
arm_smmu_tlb_sync_context+0x4c
arm_smmu_tlb_inv_context_s1+0x1ec
arm_smmu_context_fault+0xb84
irq_thread_fn+0x44
irq_thread+0x160
kthread+0x16c
ret_from_fork+0x10
Fix this by resuming the context bank before bailing out for out of bound
iova.
Change-Id: I754b38a3761869a5f0c00688211d26f1b0f47eec
Signed-off-by:
Prakash Gupta <guptap@codeaurora.org>
Loading
Please register or sign in to comment