summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0049-iommu-amd-Fix-hotplug-with-iommu-pt.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0049-iommu-amd-Fix-hotplug-with-iommu-pt.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0049-iommu-amd-Fix-hotplug-with-iommu-pt.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0049-iommu-amd-Fix-hotplug-with-iommu-pt.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0049-iommu-amd-Fix-hotplug-with-iommu-pt.patch
new file mode 100644
index 00000000..879ea879
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0049-iommu-amd-Fix-hotplug-with-iommu-pt.patch
@@ -0,0 +1,48 @@
1From 05f62dd05ef7d48fc3f9a778a5413ebcc8dc681f Mon Sep 17 00:00:00 2001
2From: Joerg Roedel <joerg.roedel@amd.com>
3Date: Thu, 19 Jul 2012 13:42:54 +0200
4Subject: [PATCH 49/73] iommu/amd: Fix hotplug with iommu=pt
5
6commit 2c9195e990297068d0f1f1bd8e2f1d09538009da upstream.
7
8This did not work because devices are not put into the
9pt_domain. Fix this.
10
11Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
12[bwh: Backported to 3.2: do not use iommu_dev_data::passthrough]
13Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
14---
15 drivers/iommu/amd_iommu.c | 10 ++++++----
16 1 files changed, 6 insertions(+), 4 deletions(-)
17
18diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
19index a1b8caa..0f074e0 100644
20--- a/drivers/iommu/amd_iommu.c
21+++ b/drivers/iommu/amd_iommu.c
22@@ -1865,6 +1865,11 @@ static int device_change_notifier(struct notifier_block *nb,
23
24 iommu_init_device(dev);
25
26+ if (iommu_pass_through) {
27+ attach_device(dev, pt_domain);
28+ break;
29+ }
30+
31 domain = domain_for_device(dev);
32
33 /* allocate a protection domain if a device is added */
34@@ -1880,10 +1885,7 @@ static int device_change_notifier(struct notifier_block *nb,
35 list_add_tail(&dma_domain->list, &iommu_pd_list);
36 spin_unlock_irqrestore(&iommu_pd_list_lock, flags);
37
38- if (!iommu_pass_through)
39- dev->archdata.dma_ops = &amd_iommu_dma_ops;
40- else
41- dev->archdata.dma_ops = &nommu_dma_ops;
42+ dev->archdata.dma_ops = &amd_iommu_dma_ops;
43
44 break;
45 case BUS_NOTIFY_DEL_DEVICE:
46--
471.7.7.6
48