Skip to content

Commit a8c4528

Browse files
committed
Merge tag 'iommu-fixes-v3.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
Pull IOMMU fixes from Joerg Roedel: "Here are some fixes which have collected since Linux v3.9-rc1. The most important one fixes a long-standing regressen which make re-hotplugged devices unusable when AMD IOMMU is used. The other patches fix build issues (build regression on OMAP and a section mismatch). One patch just removes a duplicate header include." * tag 'iommu-fixes-v3.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/amd: Make sure dma_ops are set for hotplug devices x86, io_apic: remove duplicated include from irq_remapping.c iommu: OMAP: build only on OMAP2+ amd_iommu_init: remove __init from amd_iommu_erratum_746_workaround
2 parents 3e84f48 + c2a2876 commit a8c4528

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

drivers/iommu/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ config IRQ_REMAP
130130
# OMAP IOMMU support
131131
config OMAP_IOMMU
132132
bool "OMAP IOMMU Support"
133-
depends on ARCH_OMAP
133+
depends on ARCH_OMAP2PLUS
134134
select IOMMU_API
135135

136136
config OMAP_IOVMM

drivers/iommu/amd_iommu.c

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2466,18 +2466,16 @@ static int device_change_notifier(struct notifier_block *nb,
24662466

24672467
/* allocate a protection domain if a device is added */
24682468
dma_domain = find_protection_domain(devid);
2469-
if (dma_domain)
2470-
goto out;
2471-
dma_domain = dma_ops_domain_alloc();
2472-
if (!dma_domain)
2473-
goto out;
2474-
dma_domain->target_dev = devid;
2475-
2476-
spin_lock_irqsave(&iommu_pd_list_lock, flags);
2477-
list_add_tail(&dma_domain->list, &iommu_pd_list);
2478-
spin_unlock_irqrestore(&iommu_pd_list_lock, flags);
2479-
2480-
dev_data = get_dev_data(dev);
2469+
if (!dma_domain) {
2470+
dma_domain = dma_ops_domain_alloc();
2471+
if (!dma_domain)
2472+
goto out;
2473+
dma_domain->target_dev = devid;
2474+
2475+
spin_lock_irqsave(&iommu_pd_list_lock, flags);
2476+
list_add_tail(&dma_domain->list, &iommu_pd_list);
2477+
spin_unlock_irqrestore(&iommu_pd_list_lock, flags);
2478+
}
24812479

24822480
dev->archdata.dma_ops = &amd_iommu_dma_ops;
24832481

drivers/iommu/amd_iommu_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ static void __init free_iommu_all(void)
980980
* BIOS should disable L2B micellaneous clock gating by setting
981981
* L2_L2B_CK_GATE_CONTROL[CKGateL2BMiscDisable](D0F2xF4_x90[2]) = 1b
982982
*/
983-
static void __init amd_iommu_erratum_746_workaround(struct amd_iommu *iommu)
983+
static void amd_iommu_erratum_746_workaround(struct amd_iommu *iommu)
984984
{
985985
u32 value;
986986

drivers/iommu/irq_remapping.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include <linux/cpumask.h>
33
#include <linux/kernel.h>
44
#include <linux/string.h>
5-
#include <linux/cpumask.h>
65
#include <linux/errno.h>
76
#include <linux/msi.h>
87
#include <linux/irq.h>

0 commit comments

Comments
 (0)