linux/drivers/iommu
Zhou Guanghui ea057ac8c9 iommu/arm-smmu-v3: fix event handling soft lockup
[ Upstream commit 30de2b541af98179780054836b48825fcfba4408 ]

During event processing, events are read from the event queue one
by one until the queue is empty.If the master device continuously
requests address access at the same time and the SMMU generates
events, the cyclic processing of the event takes a long time and
softlockup warnings may be reported.

arm-smmu-v3 arm-smmu-v3.34.auto: event 0x0a received:
arm-smmu-v3 arm-smmu-v3.34.auto: 	0x00007f220000280a
arm-smmu-v3 arm-smmu-v3.34.auto: 	0x000010000000007e
arm-smmu-v3 arm-smmu-v3.34.auto: 	0x00000000034e8670
watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [irq/268-arm-smm:247]
Call trace:
 _dev_info+0x7c/0xa0
 arm_smmu_evtq_thread+0x1c0/0x230
 irq_thread_fn+0x30/0x80
 irq_thread+0x128/0x210
 kthread+0x134/0x138
 ret_from_fork+0x10/0x1c
Kernel panic - not syncing: softlockup: hung tasks

Fix this by calling cond_resched() after the event information is
printed.

Signed-off-by: Zhou Guanghui <zhouguanghui1@huawei.com>
Link: https://lore.kernel.org/r/20220119070754.26528-1-zhouguanghui1@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-15 14:18:33 +02:00
..
Kconfig
Makefile
amd_iommu.c
amd_iommu.h
amd_iommu_debugfs.c
amd_iommu_init.c iommu/amd: Fix loop timeout issue in iommu_ga_log_enable() 2022-02-08 18:24:30 +01:00
amd_iommu_proto.h
amd_iommu_quirks.c
amd_iommu_types.h
amd_iommu_v2.c
arm-smmu-impl.c
arm-smmu-v3.c iommu/arm-smmu-v3: fix event handling soft lockup 2022-04-15 14:18:33 +02:00
arm-smmu.c
arm-smmu.h
dma-iommu.c
dmar.c
exynos-iommu.c
fsl_pamu.c
fsl_pamu.h
fsl_pamu_domain.c
fsl_pamu_domain.h
hyperv-iommu.c
intel-iommu-debugfs.c
intel-iommu.c
intel-pasid.c
intel-pasid.h
intel-svm.c
intel-trace.c
intel_irq_remapping.c iommu/vt-d: Fix potential memory leak in intel_setup_irq_remapping() 2022-02-08 18:24:29 +01:00
io-pgtable-arm-v7s.c
io-pgtable-arm.c
io-pgtable.c
iommu-debugfs.c
iommu-sysfs.c
iommu-traces.c
iommu.c
iova.c iommu/iova: Improve 32-bit free space estimate 2022-04-15 14:17:56 +02:00
ipmmu-vmsa.c iommu/ipmmu-vmsa: Check for error num after setting mask 2022-04-15 14:18:12 +02:00
irq_remapping.c
irq_remapping.h
msm_iommu.c
msm_iommu.h
msm_iommu_hw-8xxx.h
mtk_iommu.c
mtk_iommu.h
mtk_iommu_v1.c
of_iommu.c
omap-iommu-debug.c
omap-iommu.c
omap-iommu.h
omap-iopgtable.h
qcom_iommu.c
rockchip-iommu.c
s390-iommu.c
tegra-gart.c
tegra-smmu.c
virtio-iommu.c