From: Joerg Roedel <joerg.roedel@amd.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: Ingo Molnar <mingo@elte.hu>,
Linus Torvalds <torvalds@linux-foundation.org>,
gregkh@suse.de, avi@redhat.com, mingo@redhat.com,
dwmw2@infradead.org, weidong.han@intel.com,
linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org
Subject: Re: [GIT PULL] various IOMMU updates for 2.6.29
Date: Sat, 3 Jan 2009 23:56:27 +0100 [thread overview]
Message-ID: <20090103225627.GA21841@amd.com> (raw)
In-Reply-To: <20090103221135.GA14298@8bytes.org>
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
next prev parent reply other threads:[~2009-01-03 22:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-03 17:31 [GIT PULL] various IOMMU updates for 2.6.29 Joerg Roedel
2009-01-03 22:06 ` Ingo Molnar
2009-01-03 22:11 ` Joerg Roedel
2009-01-03 22:56 ` Joerg Roedel [this message]
2009-01-04 10:05 ` Ingo Molnar
2009-01-04 10:30 ` Joerg Roedel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090103225627.GA21841@amd.com \
--to=joerg.roedel@amd.com \
--cc=avi@redhat.com \
--cc=dwmw2@infradead.org \
--cc=gregkh@suse.de \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=torvalds@linux-foundation.org \
--cc=weidong.han@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.