diff options
-rw-r--r-- | drivers/pci/dmar.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c index f5a662a50acb..2b4162d9ca30 100644 --- a/drivers/pci/dmar.c +++ b/drivers/pci/dmar.c | |||
@@ -491,7 +491,7 @@ int alloc_iommu(struct dmar_drhd_unit *drhd) | |||
491 | int map_size; | 491 | int map_size; |
492 | u32 ver; | 492 | u32 ver; |
493 | static int iommu_allocated = 0; | 493 | static int iommu_allocated = 0; |
494 | int agaw; | 494 | int agaw = 0; |
495 | 495 | ||
496 | iommu = kzalloc(sizeof(*iommu), GFP_KERNEL); | 496 | iommu = kzalloc(sizeof(*iommu), GFP_KERNEL); |
497 | if (!iommu) | 497 | if (!iommu) |
@@ -507,6 +507,7 @@ int alloc_iommu(struct dmar_drhd_unit *drhd) | |||
507 | iommu->cap = dmar_readq(iommu->reg + DMAR_CAP_REG); | 507 | iommu->cap = dmar_readq(iommu->reg + DMAR_CAP_REG); |
508 | iommu->ecap = dmar_readq(iommu->reg + DMAR_ECAP_REG); | 508 | iommu->ecap = dmar_readq(iommu->reg + DMAR_ECAP_REG); |
509 | 509 | ||
510 | #ifdef CONFIG_DMAR | ||
510 | agaw = iommu_calculate_agaw(iommu); | 511 | agaw = iommu_calculate_agaw(iommu); |
511 | if (agaw < 0) { | 512 | if (agaw < 0) { |
512 | printk(KERN_ERR | 513 | printk(KERN_ERR |
@@ -514,6 +515,7 @@ int alloc_iommu(struct dmar_drhd_unit *drhd) | |||
514 | iommu->seq_id); | 515 | iommu->seq_id); |
515 | goto error; | 516 | goto error; |
516 | } | 517 | } |
518 | #endif | ||
517 | iommu->agaw = agaw; | 519 | iommu->agaw = agaw; |
518 | 520 | ||
519 | /* the registers might be more than one page */ | 521 | /* the registers might be more than one page */ |