lkml.org 
[lkml]   [2009]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [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@amd.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@amd.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


\
 
 \ /
  Last update: 2009-01-03 23:59    [W:0.055 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site