Skip to content

Commit 325047d

Browse files
committed
Revert "iommu/arm-smmu-v3: Fix soft lockup triggered by arm_smmu_mm_invalidate_range"
BugLink: https://bugs.launchpad.net/bugs/2048966 This reverts commit 9a5dc20. There are two versions of this patch, one for 6.5 and 6.6. This is the 6.6 version. Revert and will apply 6.5 version. Acked-by: Brad Figg <bfigg@nvidia.com> Acked-by: Ian May <ian.may@canonical.com> Signed-off-by: Ian May <ian.may@canonical.com>
1 parent 7f22e21 commit 325047d

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,6 @@ static void arm_smmu_free_shared_cd(struct arm_smmu_ctx_desc *cd)
186186
}
187187
}
188188

189-
/*
190-
* Cloned from the MAX_TLBI_OPS in arch/arm64/include/asm/tlbflush.h, this
191-
* is used as a threshold to replace per-page TLBI commands to issue in the
192-
* command queue with an address-space TLBI command, when SMMU w/o a range
193-
* invalidation feature handles too many per-page TLBI commands, which will
194-
* otherwise result in a soft lockup.
195-
*/
196-
#define CMDQ_MAX_TLBI_OPS (1 << (PAGE_SHIFT - 3))
197-
198189
static void arm_smmu_mm_invalidate_range(struct mmu_notifier *mn,
199190
struct mm_struct *mm,
200191
unsigned long start, unsigned long end)
@@ -210,14 +201,6 @@ static void arm_smmu_mm_invalidate_range(struct mmu_notifier *mn,
210201
*/
211202
size = end - start;
212203

213-
if (!(smmu_domain->smmu->features & ARM_SMMU_FEAT_RANGE_INV)) {
214-
if (size >= CMDQ_MAX_TLBI_OPS * PAGE_SIZE)
215-
size = 0;
216-
} else {
217-
if (size == ULONG_MAX)
218-
size = 0;
219-
}
220-
221204
if (!(smmu_domain->smmu->features & ARM_SMMU_FEAT_BTM))
222205
arm_smmu_tlb_inv_range_asid(start, size, smmu_mn->cd->asid,
223206
PAGE_SIZE, false, smmu_domain);

0 commit comments

Comments
 (0)