* [PATCH -tip] IA64: fix the compile error on IA64_DIG_VTD
@ 2009-01-27 14:43 FUJITA Tomonori
2009-01-27 14:46 ` Ingo Molnar
0 siblings, 1 reply; 6+ messages in thread
From: FUJITA Tomonori @ 2009-01-27 14:43 UTC (permalink / raw)
To: tony.luck, mingo; +Cc: linux-kernel, linux-ia64
Sorry about fallout from my dma mapping ops unification.
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Subject: [PATCH] IA64: fix the compile error on IA64_DIG_VTD
This moves iommu_detected to arch/ia64/kernel/dma-mapping.c from
arch/ia64/kernel/pci-swiotlb.c to fix the following error on on
IA64_DIG_VTD:
arch/ia64/kernel/built-in.o: In function `pci_iommu_init':
pci-dma.c:(.init.text+0xa021): undefined reference to `iommu_detected'
pci-dma.c:(.init.text+0xa030): undefined reference to `iommu_detected'
drivers/built-in.o: In function `detect_intel_iommu':
(.init.text+0x11c0): undefined reference to `iommu_detected'
drivers/built-in.o: In function `detect_intel_iommu':
(.init.text+0x11e1): undefined reference to `iommu_detected'
iommu_detected is used to handle IOMMUs so I guess that
arch/ia64/kernel/dma-mapping.c is ok (there might be a better place
for it though).
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
arch/ia64/kernel/dma-mapping.c | 3 +++
arch/ia64/kernel/pci-swiotlb.c | 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/ia64/kernel/dma-mapping.c b/arch/ia64/kernel/dma-mapping.c
index 7060e13..086a2ae 100644
--- a/arch/ia64/kernel/dma-mapping.c
+++ b/arch/ia64/kernel/dma-mapping.c
@@ -1,5 +1,8 @@
#include <linux/dma-mapping.h>
+/* Set this to 1 if there is a HW IOMMU in the system */
+int iommu_detected __read_mostly;
+
struct dma_map_ops *dma_ops;
EXPORT_SYMBOL(dma_ops);
diff --git a/arch/ia64/kernel/pci-swiotlb.c b/arch/ia64/kernel/pci-swiotlb.c
index d21dea4..717ad4f 100644
--- a/arch/ia64/kernel/pci-swiotlb.c
+++ b/arch/ia64/kernel/pci-swiotlb.c
@@ -13,9 +13,6 @@
int swiotlb __read_mostly;
EXPORT_SYMBOL(swiotlb);
-/* Set this to 1 if there is a HW IOMMU in the system */
-int iommu_detected __read_mostly;
-
struct dma_map_ops swiotlb_dma_ops = {
.alloc_coherent = swiotlb_alloc_coherent,
.free_coherent = swiotlb_free_coherent,
--
1.6.0.6
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH -tip] IA64: fix the compile error on IA64_DIG_VTD
2009-01-27 14:43 [PATCH -tip] IA64: fix the compile error on IA64_DIG_VTD FUJITA Tomonori
@ 2009-01-27 14:46 ` Ingo Molnar
2009-01-27 14:46 ` Ingo Molnar
0 siblings, 1 reply; 6+ messages in thread
From: Ingo Molnar @ 2009-01-27 14:46 UTC (permalink / raw)
To: FUJITA Tomonori; +Cc: tony.luck, linux-kernel, linux-ia64
* FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> wrote:
> Sorry about fallout from my dma mapping ops unification.
>
> > From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> Subject: [PATCH] IA64: fix the compile error on IA64_DIG_VTD
>
> This moves iommu_detected to arch/ia64/kernel/dma-mapping.c from
> arch/ia64/kernel/pci-swiotlb.c to fix the following error on on
> IA64_DIG_VTD:
>
> arch/ia64/kernel/built-in.o: In function `pci_iommu_init':
> pci-dma.c:(.init.text+0xa021): undefined reference to `iommu_detected'
> pci-dma.c:(.init.text+0xa030): undefined reference to `iommu_detected'
> drivers/built-in.o: In function `detect_intel_iommu':
> (.init.text+0x11c0): undefined reference to `iommu_detected'
> drivers/built-in.o: In function `detect_intel_iommu':
> (.init.text+0x11e1): undefined reference to `iommu_detected'
>
> iommu_detected is used to handle IOMMUs so I guess that
> arch/ia64/kernel/dma-mapping.c is ok (there might be a better place
> for it though).
>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> ---
> arch/ia64/kernel/dma-mapping.c | 3 +++
> arch/ia64/kernel/pci-swiotlb.c | 3 ---
> 2 files changed, 3 insertions(+), 3 deletions(-)
Applied to tip/core/iommu, thanks!
Ingo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -tip] IA64: fix the compile error on IA64_DIG_VTD
2009-01-27 14:46 ` Ingo Molnar
@ 2009-01-27 14:46 ` Ingo Molnar
2009-01-27 17:17 ` Luck, Tony
0 siblings, 1 reply; 6+ messages in thread
From: Ingo Molnar @ 2009-01-27 14:46 UTC (permalink / raw)
To: FUJITA Tomonori, tony.luck; +Cc: linux-kernel, linux-ia64
* Ingo Molnar <mingo@elte.hu> wrote:
> > ---
> > arch/ia64/kernel/dma-mapping.c | 3 +++
> > arch/ia64/kernel/pci-swiotlb.c | 3 ---
> > 2 files changed, 3 insertions(+), 3 deletions(-)
>
> Applied to tip/core/iommu, thanks!
Tony, is this fix fine with you too?
Ingo
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH -tip] IA64: fix the compile error on IA64_DIG_VTD
2009-01-27 14:46 ` Ingo Molnar
@ 2009-01-27 17:17 ` Luck, Tony
2009-01-28 1:00 ` FUJITA Tomonori
0 siblings, 1 reply; 6+ messages in thread
From: Luck, Tony @ 2009-01-27 17:17 UTC (permalink / raw)
To: Ingo Molnar, FUJITA Tomonori
Cc: linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org
> > > ---
> > > arch/ia64/kernel/dma-mapping.c | 3 +++
> > > arch/ia64/kernel/pci-swiotlb.c | 3 ---
> > > 2 files changed, 3 insertions(+), 3 deletions(-)
> >
> > Applied to tip/core/iommu, thanks!
>
> Tony, is this fix fine with you too?
It works ... and dma-mapping.c is OK as a location for the
definition. But there seemes to be some small scope for a
related cleanup:
There are "extern" declarations for "iommu_detected" in both
<asm/iommu.h> (x86 and ia64) and also in <linux/dmar.h>
Does having both of these avoid some #include hell?
-Tony
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH -tip] IA64: fix the compile error on IA64_DIG_VTD
2009-01-27 17:17 ` Luck, Tony
@ 2009-01-28 1:00 ` FUJITA Tomonori
2009-01-28 1:04 ` FUJITA Tomonori
0 siblings, 1 reply; 6+ messages in thread
From: FUJITA Tomonori @ 2009-01-28 1:00 UTC (permalink / raw)
To: tony.luck; +Cc: mingo, fujita.tomonori, linux-kernel, linux-ia64
On Tue, 27 Jan 2009 09:17:58 -0800
"Luck, Tony" <tony.luck@intel.com> wrote:
> > > > ---
> > > > arch/ia64/kernel/dma-mapping.c | 3 +++
> > > > arch/ia64/kernel/pci-swiotlb.c | 3 ---
> > > > 2 files changed, 3 insertions(+), 3 deletions(-)
> > >
> > > Applied to tip/core/iommu, thanks!
> >
> > Tony, is this fix fine with you too?
>
> It works ... and dma-mapping.c is OK as a location for the
> definition. But there seemes to be some small scope for a
> related cleanup:
>
> There are "extern" declarations for "iommu_detected" in both
> <asm/iommu.h> (x86 and ia64) and also in <linux/dmar.h>
We can remove them in dmar.h. X86 exported iommu_detected and no_iommu
in several IOMMU code and we merged them into dmar.h. Seems that we
forgot to clean up dmar.h.
> Does having both of these avoid some #include hell?
I think we could. The root problem is that X86 sets up IOMMU in a very
hacky way. When we added VT-d support to IA64, we needed to add the
hacky code to IA64 even though IA64 doesn't need it.
We need to clean up the code to set up IOMMUs. I'll try later.
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Subject: [PATCH -tip] intel-iommu: no need to export iommu_detected and no_iommu in dmar.h
The users of intel-iommu (x86 and IA64) export iommu_detected and
no_iommu in their own iommu.h.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
include/linux/dmar.h | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/include/linux/dmar.h b/include/linux/dmar.h
index f284407..3e82a13 100644
--- a/include/linux/dmar.h
+++ b/include/linux/dmar.h
@@ -129,7 +129,6 @@ extern void dmar_msi_write(int irq, struct msi_msg *msg);
extern int dmar_set_interrupt(struct intel_iommu *iommu);
extern int arch_setup_dmar_msi(unsigned int irq);
-extern int iommu_detected, no_iommu;
extern struct list_head dmar_rmrr_units;
struct dmar_rmrr_unit {
struct list_head list; /* list of rmrr units */
--
1.6.0.6
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [PATCH -tip] IA64: fix the compile error on IA64_DIG_VTD
2009-01-28 1:00 ` FUJITA Tomonori
@ 2009-01-28 1:04 ` FUJITA Tomonori
0 siblings, 0 replies; 6+ messages in thread
From: FUJITA Tomonori @ 2009-01-28 1:04 UTC (permalink / raw)
To: tony.luck; +Cc: mingo, linux-kernel, linux-ia64
On Wed, 28 Jan 2009 10:00:11 +0900
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> wrote:
> On Tue, 27 Jan 2009 09:17:58 -0800
> "Luck, Tony" <tony.luck@intel.com> wrote:
>
> > > > > ---
> > > > > arch/ia64/kernel/dma-mapping.c | 3 +++
> > > > > arch/ia64/kernel/pci-swiotlb.c | 3 ---
> > > > > 2 files changed, 3 insertions(+), 3 deletions(-)
> > > >
> > > > Applied to tip/core/iommu, thanks!
> > >
> > > Tony, is this fix fine with you too?
> >
> > It works ... and dma-mapping.c is OK as a location for the
> > definition. But there seemes to be some small scope for a
> > related cleanup:
> >
> > There are "extern" declarations for "iommu_detected" in both
> > <asm/iommu.h> (x86 and ia64) and also in <linux/dmar.h>
>
> We can remove them in dmar.h. X86 exported iommu_detected and no_iommu
> in several IOMMU code and we merged them into dmar.h. Seems that we
~~~~~~
asm/iommu.h
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-01-28 1:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-27 14:43 [PATCH -tip] IA64: fix the compile error on IA64_DIG_VTD FUJITA Tomonori
2009-01-27 14:46 ` Ingo Molnar
2009-01-27 14:46 ` Ingo Molnar
2009-01-27 17:17 ` Luck, Tony
2009-01-28 1:00 ` FUJITA Tomonori
2009-01-28 1:04 ` FUJITA Tomonori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox