iommu/amd: Make amd_iommu_devtable_lock a spin_lock
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Thu, 22 Mar 2018 15:22:41 +0000 (16:22 +0100)
committerJoerg Roedel <jroedel@suse.de>
Thu, 29 Mar 2018 08:38:17 +0000 (10:38 +0200)
commit2cd1083d79a0a8c223af430ca97884c28a1e2fc0
tree02b576c3fd3c6c9726cd6cab987f96acf2d68aa7
parent993ca6e063a69a0c65ca42ed449b6bc1b3844151
iommu/amd: Make amd_iommu_devtable_lock a spin_lock

Before commit 0bb6e243d7fb ("iommu/amd: Support IOMMU_DOMAIN_DMA type
allocation") amd_iommu_devtable_lock had a read_lock() user but now
there are none. In fact, after the mentioned commit we had only
write_lock() user of the lock. Since there is no reason to keep it as
writer lock, change its type to a spin_lock.
I *think* that we might even be able to remove the lock because all its
current user seem to have their own protection.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu.c