[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090103225627.GA21841@amd.com>
Date: Sat, 3 Jan 2009 23:56:27 +0100
From: Joerg Roedel <joerg.roedel@....com>
To: Joerg Roedel <joro@...tes.org>
CC: Ingo Molnar <mingo@...e.hu>,
Linus Torvalds <torvalds@...ux-foundation.org>, gregkh@...e.de,
avi@...hat.com, mingo@...hat.com, dwmw2@...radead.org,
weidong.han@...el.com, linux-kernel@...r.kernel.org,
iommu@...ts.linux-foundation.org
Subject: Re: [GIT PULL] various IOMMU updates for 2.6.29
On Sat, Jan 03, 2009 at 11:11:35PM +0100, Joerg Roedel wrote:
> > drivers/built-in.o: In function `alloc_iommu':
> > : undefined reference to `iommu_calculate_agaw'
> >
>
> thanks for the report. I will look at it.
>
Ok, this patch fixes the build problem. It should be safe but I can't
test this because I don't have any VT-d hardware. David, is this patch
ok?
commit c9740e758a5b024235429461540b7e5aabc21cc6
Author: Joerg Roedel <joerg.roedel@....com>
Date: Sat Jan 3 23:46:21 2009 +0100
intel-iommu: fix build error with INTR_REMAP=y and DMAR=n
Impact: build fix (set agaw for iommu only if DMAR enabled)
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@....com>
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c
index f5a662a..2b4162d 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 */
--
| AMD Saxony Limited Liability Company & Co. KG
Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany
System | Register Court Dresden: HRA 4896
Research | General Partner authorized to represent:
Center | AMD Saxony LLC (Wilmington, Delaware, US)
| General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists