aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/intel-iommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iommu/intel-iommu.c')
-rw-r--r--drivers/iommu/intel-iommu.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index b9cc9c2b03fc..2779354321f5 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -330,17 +330,10 @@ static int hw_pass_through = 1;
330/* si_domain contains mulitple devices */ 330/* si_domain contains mulitple devices */
331#define DOMAIN_FLAG_STATIC_IDENTITY (1 << 1) 331#define DOMAIN_FLAG_STATIC_IDENTITY (1 << 1)
332 332
333/* define the limit of IOMMUs supported in each domain */
334#ifdef CONFIG_X86
335# define IOMMU_UNITS_SUPPORTED MAX_IO_APICS
336#else
337# define IOMMU_UNITS_SUPPORTED 64
338#endif
339
340struct dmar_domain { 333struct dmar_domain {
341 int id; /* domain id */ 334 int id; /* domain id */
342 int nid; /* node id */ 335 int nid; /* node id */
343 DECLARE_BITMAP(iommu_bmp, IOMMU_UNITS_SUPPORTED); 336 DECLARE_BITMAP(iommu_bmp, DMAR_UNITS_SUPPORTED);
344 /* bitmap of iommus this domain uses*/ 337 /* bitmap of iommus this domain uses*/
345 338
346 struct list_head devices; /* all devices' list */ 339 struct list_head devices; /* all devices' list */
@@ -2730,12 +2723,12 @@ static int __init init_dmars(void)
2730 * threaded kernel __init code path all other access are read 2723 * threaded kernel __init code path all other access are read
2731 * only 2724 * only
2732 */ 2725 */
2733 if (g_num_of_iommus < IOMMU_UNITS_SUPPORTED) { 2726 if (g_num_of_iommus < DMAR_UNITS_SUPPORTED) {
2734 g_num_of_iommus++; 2727 g_num_of_iommus++;
2735 continue; 2728 continue;
2736 } 2729 }
2737 printk_once(KERN_ERR "intel-iommu: exceeded %d IOMMUs\n", 2730 printk_once(KERN_ERR "intel-iommu: exceeded %d IOMMUs\n",
2738 IOMMU_UNITS_SUPPORTED); 2731 DMAR_UNITS_SUPPORTED);
2739 } 2732 }
2740 2733
2741 g_iommus = kcalloc(g_num_of_iommus, sizeof(struct intel_iommu *), 2734 g_iommus = kcalloc(g_num_of_iommus, sizeof(struct intel_iommu *),