linux-stable/drivers/iommu
Zhou Guanghui 99073052f4 iommu/arm-smmu-v3: fix event handling soft lockup
[ Upstream commit 30de2b541a ]

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-13 20:59:04 +02:00
..
amd iommu/amd: Fix I/O page table memory leak 2022-03-08 19:12:49 +01:00
arm iommu/arm-smmu-v3: fix event handling soft lockup 2022-04-13 20:59:04 +02:00
intel iommu/vt-d: Fix double list_add when enabling VMD in scalable mode 2022-03-08 19:12:43 +01:00
apple-dart.c iommu/dart: Initialize DART_STREAMS_ENABLE 2021-11-25 09:48:30 +01:00
dma-iommu.c iommu/dma: Account for min_align_mask w/swiotlb 2022-04-08 14:24:17 +02:00
exynos-iommu.c
fsl_pamu.c
fsl_pamu.h
fsl_pamu_domain.c
fsl_pamu_domain.h
hyperv-iommu.c
io-pgfault.c
io-pgtable-arm-v7s.c iommu/io-pgtable-arm-v7s: Add error handle for page table allocation failure 2022-01-27 11:02:58 +01:00
io-pgtable-arm.c iommu/io-pgtable-arm: Fix table descriptor paddr formatting 2022-01-27 11:04:10 +01:00
io-pgtable-arm.h
io-pgtable.c
ioasid.c
iommu-debugfs.c
iommu-sva-lib.c
iommu-sva-lib.h
iommu-sysfs.c
iommu-traces.c
iommu.c iommu: Fix potential use-after-free during probe 2022-02-16 12:56:41 +01:00
iova.c iommu/iova: Improve 32-bit free space estimate 2022-04-08 14:22:48 +02:00
ipmmu-vmsa.c iommu/ipmmu-vmsa: Check for error num after setting mask 2022-04-08 14:23:31 +02:00
irq_remapping.c
irq_remapping.h
Kconfig
Makefile
msm_iommu.c
msm_iommu.h
msm_iommu_hw-8xxx.h
mtk_iommu.c media: iommu/mediatek: Add device_link between the consumer and the larb devices 2022-04-08 14:23:59 +02:00
mtk_iommu.h
mtk_iommu_v1.c media: iommu/mediatek: Add device_link between the consumer and the larb devices 2022-04-08 14:23:59 +02:00
of_iommu.c
omap-iommu-debug.c
omap-iommu.c
omap-iommu.h
omap-iopgtable.h
rockchip-iommu.c iommu/rockchip: Fix PAGE_DESC_HI_MASKs for RK3568 2021-12-01 09:04:54 +01:00
s390-iommu.c
sprd-iommu.c
sun50i-iommu.c
tegra-gart.c
tegra-smmu.c iommu/tegra-smmu: Fix missing put_device() call in tegra_smmu_find 2022-03-08 19:12:47 +01:00
virtio-iommu.c