iommu/mediatek: Add mutex for data in the mtk_iommu_domain
authorYong Wu <yong.wu@mediatek.com>
Tue, 3 May 2022 07:13:59 +0000 (15:13 +0800)
committerJoerg Roedel <jroedel@suse.de>
Wed, 4 May 2022 08:39:38 +0000 (10:39 +0200)
commitddf67a87bebf2a8750d86f67cb298313ee93db31
treefb45f3cfd48a1e8f3dbdd3de77790c54fdb2bd2b
parent0e5a3f2e630b28e88e018655548212ef8eb4dfcb
iommu/mediatek: Add mutex for data in the mtk_iommu_domain

Same with the previous patch, add a mutex for the "data" in the
mtk_iommu_domain. Just improve the safety for multi devices
enter attach_device at the same time. We don't get the real issue
for this.

Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/20220503071427.2285-9-yong.wu@mediatek.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/mtk_iommu.c