diff options
author | Joerg Roedel <joro@8bytes.org> | 2014-04-16 10:09:40 -0400 |
---|---|---|
committer | Joerg Roedel <joro@8bytes.org> | 2014-04-16 10:09:40 -0400 |
commit | 3426cb3d3578eab55ec231e0ce4dfc12ec3abc1f (patch) | |
tree | e7b4c02ef4ce3fb11396a3fed33eeb29cba2f124 /drivers/iommu | |
parent | aca1bc4595c5757f01167ab5bfef2a4f8edfcf4f (diff) | |
parent | 5ae0566a0fffa09a77ac5996e3854fe91cd87167 (diff) |
Merge git://git.infradead.org/iommu-2.6 into iommu/fixes
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/dmar.c | 3 | ||||
-rw-r--r-- | drivers/iommu/intel-iommu.c | 10 |
2 files changed, 9 insertions, 4 deletions
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index f445c10df8df..39f8b717fe84 100644 --- a/drivers/iommu/dmar.c +++ b/drivers/iommu/dmar.c | |||
@@ -152,7 +152,8 @@ dmar_alloc_pci_notify_info(struct pci_dev *dev, unsigned long event) | |||
152 | info->seg = pci_domain_nr(dev->bus); | 152 | info->seg = pci_domain_nr(dev->bus); |
153 | info->level = level; | 153 | info->level = level; |
154 | if (event == BUS_NOTIFY_ADD_DEVICE) { | 154 | if (event == BUS_NOTIFY_ADD_DEVICE) { |
155 | for (tmp = dev, level--; tmp; tmp = tmp->bus->self) { | 155 | for (tmp = dev; tmp; tmp = tmp->bus->self) { |
156 | level--; | ||
156 | info->path[level].device = PCI_SLOT(tmp->devfn); | 157 | info->path[level].device = PCI_SLOT(tmp->devfn); |
157 | info->path[level].function = PCI_FUNC(tmp->devfn); | 158 | info->path[level].function = PCI_FUNC(tmp->devfn); |
158 | if (pci_is_root_bus(tmp->bus)) | 159 | if (pci_is_root_bus(tmp->bus)) |
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 69fa7da5e48b..f256ffc02e29 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c | |||
@@ -1009,11 +1009,13 @@ static struct page *dma_pte_list_pagetables(struct dmar_domain *domain, | |||
1009 | if (level == 1) | 1009 | if (level == 1) |
1010 | return freelist; | 1010 | return freelist; |
1011 | 1011 | ||
1012 | for (pte = page_address(pg); !first_pte_in_page(pte); pte++) { | 1012 | pte = page_address(pg); |
1013 | do { | ||
1013 | if (dma_pte_present(pte) && !dma_pte_superpage(pte)) | 1014 | if (dma_pte_present(pte) && !dma_pte_superpage(pte)) |
1014 | freelist = dma_pte_list_pagetables(domain, level - 1, | 1015 | freelist = dma_pte_list_pagetables(domain, level - 1, |
1015 | pte, freelist); | 1016 | pte, freelist); |
1016 | } | 1017 | pte++; |
1018 | } while (!first_pte_in_page(pte)); | ||
1017 | 1019 | ||
1018 | return freelist; | 1020 | return freelist; |
1019 | } | 1021 | } |
@@ -2235,7 +2237,9 @@ static struct dmar_domain *get_domain_for_dev(struct device *dev, int gaw) | |||
2235 | bridge_devfn = dev_tmp->devfn; | 2237 | bridge_devfn = dev_tmp->devfn; |
2236 | } | 2238 | } |
2237 | spin_lock_irqsave(&device_domain_lock, flags); | 2239 | spin_lock_irqsave(&device_domain_lock, flags); |
2238 | info = dmar_search_domain_by_dev_info(segment, bus, devfn); | 2240 | info = dmar_search_domain_by_dev_info(segment, |
2241 | bridge_bus, | ||
2242 | bridge_devfn); | ||
2239 | if (info) { | 2243 | if (info) { |
2240 | iommu = info->iommu; | 2244 | iommu = info->iommu; |
2241 | domain = info->domain; | 2245 | domain = info->domain; |