Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iommu/amd: Hide unused iommu_table_lock

The newly introduced lock is only used when CONFIG_IRQ_REMAP is enabled:

drivers/iommu/amd_iommu.c:86:24: error: 'iommu_table_lock' defined but not used [-Werror=unused-variable]
static DEFINE_SPINLOCK(iommu_table_lock);

This moves the definition next to the user, within the #ifdef protected
section of the file.

Fixes: ea6166f4b83e ("iommu/amd: Split irq_lookup_table out of the amd_iommu_devtable_lock")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>

authored by

Arnd Bergmann and committed by
Joerg Roedel
94c793ac aa7528fe

+1 -1
+1 -1
drivers/iommu/amd_iommu.c
··· 83 83 84 84 static DEFINE_SPINLOCK(amd_iommu_devtable_lock); 85 85 static DEFINE_SPINLOCK(pd_bitmap_lock); 86 - static DEFINE_SPINLOCK(iommu_table_lock); 87 86 88 87 /* List of all available dev_data structures */ 89 88 static LLIST_HEAD(dev_data_list); ··· 3561 3562 *****************************************************************************/ 3562 3563 3563 3564 static struct irq_chip amd_ir_chip; 3565 + static DEFINE_SPINLOCK(iommu_table_lock); 3564 3566 3565 3567 static void set_dte_irq_entry(u16 devid, struct irq_remap_table *table) 3566 3568 {