linux-stable/drivers/iommu
Zhou Guanghui 5e580cce4d 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-20 09:08:27 +02:00
..
amd_iommu.c iommu/amd: Fix sleeping in atomic in increase_address_space() 2021-03-11 13:51:05 +01:00
amd_iommu_init.c iommu/amd: Fix loop timeout issue in iommu_ga_log_enable() 2022-02-08 18:16:28 +01:00
amd_iommu_proto.h
amd_iommu_types.h iommu/amd: Set DTE[IntTabLen] to represent 512 IRTEs 2020-12-11 13:39:06 +01:00
amd_iommu_v2.c
arm-smmu-regs.h
arm-smmu-v3.c iommu/arm-smmu-v3: fix event handling soft lockup 2022-04-20 09:08:27 +02:00
arm-smmu.c
dma-iommu.c iommu/dma: Fix MSI reservation allocation 2020-03-20 10:54:18 +01:00
dmar.c iommu/vt-d: Fix sysfs leak in alloc_iommu() 2021-06-03 08:36:12 +02:00
exynos-iommu.c iommu/exynos: add missing put_device() call in exynos_iommu_of_xlate() 2020-10-14 09:51:08 +02:00
fsl_pamu.c
fsl_pamu.h
fsl_pamu_domain.c
fsl_pamu_domain.h
intel-iommu.c iommu/vt-d: Do not use flush-queue when caching-mode is on 2021-02-10 09:12:10 +01:00
intel-svm.c iommu/vt-d: Fix mm reference leak 2020-04-24 08:01:21 +02:00
intel_irq_remapping.c iommu/vt-d: Fix potential memory leak in intel_setup_irq_remapping() 2022-02-08 18:16:28 +01:00
io-pgtable-arm-v7s.c
io-pgtable-arm.c iommu/io-pgtable-arm: Fix race handling in split_blk_unmap() 2019-11-24 08:22:52 +01:00
io-pgtable.c
io-pgtable.h
iommu-sysfs.c
iommu-traces.c
iommu.c iommu: Fix reference count leak in iommu_group_alloc. 2020-06-03 08:18:03 +02:00
iova.c iommu/iova: Fix race between FQ timeout and teardown 2022-01-27 09:00:53 +01:00
ipmmu-vmsa.c
irq_remapping.c
irq_remapping.h
Kconfig
Makefile
msm_iommu.c
msm_iommu.h
msm_iommu_hw-8xxx.h
mtk_iommu.c iommu/mediatek: Fix iova_to_phys PA start for 4GB mode 2020-01-27 14:46:44 +01:00
mtk_iommu.h
mtk_iommu_v1.c
of_iommu.c
omap-iommu-debug.c iommu/omap: Check for failure of a call to omap_iommu_dump_ctx 2020-08-21 09:48:21 +02:00
omap-iommu.c
omap-iommu.h
omap-iopgtable.h
qcom_iommu.c iommu/qcom: Fix local_base status check 2020-05-05 19:15:51 +02:00
rockchip-iommu.c
s390-iommu.c
tegra-gart.c
tegra-smmu.c iommu/tegra-smmu: Fix page tables in > 4 GiB memory 2020-01-04 13:59:36 +01:00