diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-01-03 23:56:27 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-02-09 10:00:53 +0000 |
commit | 43f7392ba9e2585bf34f21399b1ed78692b5d437 (patch) | |
tree | c39a18e7bd3185bdfae392b8074fff75a90f39eb /drivers/pci/dmar.c | |
parent | 8e4921515c1a379539607eb443d51c30f4f7f338 (diff) | |
download | kernel-crypto-43f7392ba9e2585bf34f21399b1ed78692b5d437.tar.gz kernel-crypto-43f7392ba9e2585bf34f21399b1ed78692b5d437.tar.xz kernel-crypto-43f7392ba9e2585bf34f21399b1ed78692b5d437.zip |
intel-iommu: fix build error with INTR_REMAP=y and DMAR=n
This fix should be safe since iommu->agaw is only used in intel-iommu.c.
And this file is only compiled with DMAR=y.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/pci/dmar.c')
-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 f5a662a50ac..2b4162d9ca3 100644 --- a/drivers/pci/dmar.c +++ b/drivers/pci/dmar.c @@ -491,7 +491,7 @@ int alloc_iommu(struct dmar_drhd_unit *drhd) int map_size; u32 ver; static int iommu_allocated = 0; - int agaw; + int agaw = 0; iommu = kzalloc(sizeof(*iommu), GFP_KERNEL); if (!iommu) @@ -507,6 +507,7 @@ int alloc_iommu(struct dmar_drhd_unit *drhd) iommu->cap = dmar_readq(iommu->reg + DMAR_CAP_REG); iommu->ecap = dmar_readq(iommu->reg + DMAR_ECAP_REG); +#ifdef CONFIG_DMAR agaw = iommu_calculate_agaw(iommu); if (agaw < 0) { printk(KERN_ERR @@ -514,6 +515,7 @@ int alloc_iommu(struct dmar_drhd_unit *drhd) iommu->seq_id); goto error; } +#endif iommu->agaw = agaw; /* the registers might be more than one page */ |