aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-12-20 06:14:26 -0500
committerIngo Molnar <mingo@elte.hu>2011-12-20 06:14:26 -0500
commit45aa0663cc408617b79a2b53f0a5f50e94688a48 (patch)
tree0a53931c317c3c72a3555bd2fbb70a881ee870f2 /drivers/iommu
parent511585a28e5b5fd1cac61e601e42efc4c5dd64b5 (diff)
parent7bd0b0f0da3b1ec11cbcc798eb0ef747a1184077 (diff)
Merge branch 'memblock-kill-early_node_map' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc into core/memblock
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/intel-iommu.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index bdc447fd4766..31053a951c34 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -41,6 +41,7 @@
41#include <linux/tboot.h> 41#include <linux/tboot.h>
42#include <linux/dmi.h> 42#include <linux/dmi.h>
43#include <linux/pci-ats.h> 43#include <linux/pci-ats.h>
44#include <linux/memblock.h>
44#include <asm/cacheflush.h> 45#include <asm/cacheflush.h>
45#include <asm/iommu.h> 46#include <asm/iommu.h>
46 47
@@ -2188,18 +2189,6 @@ static inline void iommu_prepare_isa(void)
2188 2189
2189static int md_domain_init(struct dmar_domain *domain, int guest_width); 2190static int md_domain_init(struct dmar_domain *domain, int guest_width);
2190 2191
2191static int __init si_domain_work_fn(unsigned long start_pfn,
2192 unsigned long end_pfn, void *datax)
2193{
2194 int *ret = datax;
2195
2196 *ret = iommu_domain_identity_map(si_domain,
2197 (uint64_t)start_pfn << PAGE_SHIFT,
2198 (uint64_t)end_pfn << PAGE_SHIFT);
2199 return *ret;
2200
2201}
2202
2203static int __init si_domain_init(int hw) 2192static int __init si_domain_init(int hw)
2204{ 2193{
2205 struct dmar_drhd_unit *drhd; 2194 struct dmar_drhd_unit *drhd;
@@ -2231,9 +2220,15 @@ static int __init si_domain_init(int hw)
2231 return 0; 2220 return 0;
2232 2221
2233 for_each_online_node(nid) { 2222 for_each_online_node(nid) {
2234 work_with_active_regions(nid, si_domain_work_fn, &ret); 2223 unsigned long start_pfn, end_pfn;
2235 if (ret) 2224 int i;
2236 return ret; 2225
2226 for_each_mem_pfn_range(i, nid, &start_pfn, &end_pfn, NULL) {
2227 ret = iommu_domain_identity_map(si_domain,
2228 PFN_PHYS(start_pfn), PFN_PHYS(end_pfn));
2229 if (ret)
2230 return ret;
2231 }
2237 } 2232 }
2238 2233
2239 return 0; 2234 return 0;