summaryrefslogtreecommitdiff
path: root/drivers/iommu/intel/debugfs.c
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2022-07-12 08:08:56 +0800
committerJoerg Roedel <jroedel@suse.de>2022-07-15 10:21:36 +0200
commitffd5869d935303b3e8dedf0d6fbe202ace66c653 (patch)
treeaa19731aecd0391f3425fa113097aef0c6d4113c /drivers/iommu/intel/debugfs.c
parent2e1c8dafb8c2c459baa5aef5b338c15edd9b9b5b (diff)
downloadlinux-ffd5869d935303b3e8dedf0d6fbe202ace66c653.tar.gz
linux-ffd5869d935303b3e8dedf0d6fbe202ace66c653.tar.bz2
linux-ffd5869d935303b3e8dedf0d6fbe202ace66c653.zip
iommu/vt-d: Replace spin_lock_irqsave() with spin_lock()
The iommu->lock is used to protect changes in root/context/pasid tables and domain ID allocation. There's no use case to change these resources in any interrupt context. Therefore, it is unnecessary to disable the interrupts when the spinlock is held. The same thing happens on the device_domain_lock side, which protects the device domain attachment information. This replaces spin_lock/unlock_irqsave/irqrestore() calls with the normal spin_lock/unlock(). Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Link: https://lore.kernel.org/r/20220706025524.2904370-6-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/intel/debugfs.c')
-rw-r--r--drivers/iommu/intel/debugfs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/iommu/intel/debugfs.c b/drivers/iommu/intel/debugfs.c
index 6e1a3f88abc8..1f925285104e 100644
--- a/drivers/iommu/intel/debugfs.c
+++ b/drivers/iommu/intel/debugfs.c
@@ -263,10 +263,9 @@ static void ctx_tbl_walk(struct seq_file *m, struct intel_iommu *iommu, u16 bus)
static void root_tbl_walk(struct seq_file *m, struct intel_iommu *iommu)
{
- unsigned long flags;
u16 bus;
- spin_lock_irqsave(&iommu->lock, flags);
+ spin_lock(&iommu->lock);
seq_printf(m, "IOMMU %s: Root Table Address: 0x%llx\n", iommu->name,
(u64)virt_to_phys(iommu->root_entry));
seq_puts(m, "B.D.F\tRoot_entry\t\t\t\tContext_entry\t\t\t\tPASID\tPASID_table_entry\n");
@@ -278,8 +277,7 @@ static void root_tbl_walk(struct seq_file *m, struct intel_iommu *iommu)
*/
for (bus = 0; bus < 256; bus++)
ctx_tbl_walk(m, iommu, bus);
-
- spin_unlock_irqrestore(&iommu->lock, flags);
+ spin_unlock(&iommu->lock);
}
static int dmar_translation_struct_show(struct seq_file *m, void *unused)