2008-10-21 19:15:00

by David Woodhouse

[permalink] [raw]
Subject: [GIT *] iommu fixes for 2.6.28

Linus, please pull from git://git.infradead.org/iommu-2.6.git

This contains a few iommu-related fixes -- it restores DMA remapping on
newer Intel hardware, which was disabled by the interrupt remapping
patches, adds IA64 support for the Intel IOMMU, and some other small
fixes.

MAINTAINERS | 7 +
arch/x86/kernel/amd_iommu_init.c | 2 +-
arch/x86/kernel/pci-dma.c | 16 ---
drivers/pci/dmar.c | 119 +++++++++++++-----
drivers/pci/intel-iommu.c | 250 ++++++++++++++++++++------------------
drivers/pci/quirks.c | 14 ++
include/asm-x86/iommu.h | 4 +
include/linux/dma_remapping.h | 27 ++--
include/linux/intel-iommu.h | 66 ++++++++---
9 files changed, 305 insertions(+), 200 deletions(-)

Andreas Herrmann (1):
amd_iommu: fix nasty bug that caused ILLEGAL_DEVICE_TABLE_ENTRY errors

David Woodhouse (4):
dmar: fix uninitialised 'ret' variable in dmar_parse_dev()
Admit to maintaining VT-d, for my sins.
Merge branch 'master' of master.kernel.org:/.../torvalds/linux-2.6
Merge branch 'master' of master.kernel.org:/.../torvalds/linux-2.6

FUJITA Tomonori (1):
intel-iommu: use coherent_dma_mask in alloc_coherent

Fenghua Yu (1):
intel-iommu: IA64 support

Suresh Siddha (1):
dmar: use spin_lock_irqsave() in qi_submit_sync()

Youquan Song (3):
dmar: context cache and IOTLB invalidation using queued invalidation
dmar: Use queued invalidation interface for IOTLB and context invalidation
dmar: remove the quirk which disables dma-remapping when intr-remapping enabled

--
dwmw2


2008-10-24 11:02:11

by Ingo Molnar

[permalink] [raw]
Subject: Re: [GIT *] iommu fixes for 2.6.28


* David Woodhouse <[email protected]> wrote:

> This contains a few iommu-related fixes -- it restores DMA remapping
> on newer Intel hardware, which was disabled by the interrupt remapping
> patches, adds IA64 support for the Intel IOMMU, and some other small
> fixes.
>
> MAINTAINERS | 7 +
> arch/x86/kernel/amd_iommu_init.c | 2 +-
> arch/x86/kernel/pci-dma.c | 16 ---
> drivers/pci/dmar.c | 119 +++++++++++++-----
> drivers/pci/intel-iommu.c | 250 ++++++++++++++++++++------------------
> drivers/pci/quirks.c | 14 ++
> include/asm-x86/iommu.h | 4 +
> include/linux/dma_remapping.h | 27 ++--
> include/linux/intel-iommu.h | 66 ++++++++---
> 9 files changed, 305 insertions(+), 200 deletions(-)

hm, i just updated to v2.6.28-rc1, and these changes broke the x86
32-bit build:

arch/x86/kernel/built-in.o: In function `dma_supported':
(.text+0x5797): undefined reference to `forbid_dac'
arch/x86/kernel/built-in.o: In function `iommu_setup':
pci-dma.c:(.init.text+0x326c): undefined reference to `forbid_dac'
pci-dma.c:(.init.text+0x328b): undefined reference to `forbid_dac'
pci-dma.c:(.init.text+0x32aa): undefined reference to `forbid_dac'

seems to be caused by:

5b6985c: intel-iommu: IA64 support

config attached. (allnoconfig seems to trigger it too)

Ingo


Attachments:
(No filename) (1.36 kB)
config (49.10 kB)
Download all attachments

2008-10-24 11:08:42

by Ingo Molnar

[permalink] [raw]
Subject: Re: [GIT *] iommu fixes for 2.6.28


> hm, i just updated to v2.6.28-rc1, and these changes broke the x86
> 32-bit build:
>
> arch/x86/kernel/built-in.o: In function `dma_supported':
> (.text+0x5797): undefined reference to `forbid_dac'
> arch/x86/kernel/built-in.o: In function `iommu_setup':
> pci-dma.c:(.init.text+0x326c): undefined reference to `forbid_dac'

i've applied the fix below to tip/x86/urgent.

Ingo

------------->
>From 20c00ed26a47619647458effc795041d5101ebd9 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
Date: Fri, 24 Oct 2008 13:12:10 +0200
Subject: [PATCH] iommu, x86: fix build failure

this iommu patch:

5b6985c: intel-iommu: IA64 support

broke the !CONFIG_PCI build on x86:

arch/x86/kernel/built-in.o: In function `dma_supported':
(.text+0x5797): undefined reference to `forbid_dac'
arch/x86/kernel/built-in.o: In function `iommu_setup':
pci-dma.c:(.init.text+0x326c): undefined reference to `forbid_dac'
pci-dma.c:(.init.text+0x328b): undefined reference to `forbid_dac'
pci-dma.c:(.init.text+0x32aa): undefined reference to `forbid_dac'

because the forbid_dac variable is only available on CONFIG_PCI,
while the x86 DMA code is built-in.

Fix it.

Signed-off-by: Ingo Molnar <[email protected]>
---
arch/x86/kernel/pci-dma.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index 1972266..47c5a7a 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -202,6 +202,7 @@ static __init int iommu_setup(char *p)
iommu_merge = 0;
if (!strncmp(p, "forcesac", 8))
iommu_sac_force = 1;
+#ifdef CONFIG_PCI
if (!strncmp(p, "allowdac", 8))
forbid_dac = 0;
if (!strncmp(p, "nodac", 5))
@@ -210,6 +211,7 @@ static __init int iommu_setup(char *p)
forbid_dac = -1;
return 1;
}
+#endif
#ifdef CONFIG_SWIOTLB
if (!strncmp(p, "soft", 4))
swiotlb = 1;

2008-10-24 11:11:25

by FUJITA Tomonori

[permalink] [raw]
Subject: Re: [GIT *] iommu fixes for 2.6.28

On Fri, 24 Oct 2008 13:01:25 +0200
Ingo Molnar <[email protected]> wrote:

>
> * David Woodhouse <[email protected]> wrote:
>
> > This contains a few iommu-related fixes -- it restores DMA remapping
> > on newer Intel hardware, which was disabled by the interrupt remapping
> > patches, adds IA64 support for the Intel IOMMU, and some other small
> > fixes.
> >
> > MAINTAINERS | 7 +
> > arch/x86/kernel/amd_iommu_init.c | 2 +-
> > arch/x86/kernel/pci-dma.c | 16 ---
> > drivers/pci/dmar.c | 119 +++++++++++++-----
> > drivers/pci/intel-iommu.c | 250 ++++++++++++++++++++------------------
> > drivers/pci/quirks.c | 14 ++
> > include/asm-x86/iommu.h | 4 +
> > include/linux/dma_remapping.h | 27 ++--
> > include/linux/intel-iommu.h | 66 ++++++++---
> > 9 files changed, 305 insertions(+), 200 deletions(-)
>
> hm, i just updated to v2.6.28-rc1, and these changes broke the x86
> 32-bit build:
>
> arch/x86/kernel/built-in.o: In function `dma_supported':
> (.text+0x5797): undefined reference to `forbid_dac'
> arch/x86/kernel/built-in.o: In function `iommu_setup':
> pci-dma.c:(.init.text+0x326c): undefined reference to `forbid_dac'
> pci-dma.c:(.init.text+0x328b): undefined reference to `forbid_dac'
> pci-dma.c:(.init.text+0x32aa): undefined reference to `forbid_dac'
>
> seems to be caused by:
>
> 5b6985c: intel-iommu: IA64 support

http://marc.info/?l=linux-kernel&m=122480590627590&w=2


Sharing forbid_dac between IA64 and X86 doesn't make sense and IA64
doesn't even use forbid_dac... Reverting the forbid_dac relocation is
the right fix, I think.

2008-10-24 11:22:44

by Ingo Molnar

[permalink] [raw]
Subject: Re: [GIT *] iommu fixes for 2.6.28


* FUJITA Tomonori <[email protected]> wrote:

> On Fri, 24 Oct 2008 13:01:25 +0200
> Ingo Molnar <[email protected]> wrote:
>
> >
> > * David Woodhouse <[email protected]> wrote:
> >
> > > This contains a few iommu-related fixes -- it restores DMA remapping
> > > on newer Intel hardware, which was disabled by the interrupt remapping
> > > patches, adds IA64 support for the Intel IOMMU, and some other small
> > > fixes.
> > >
> > > MAINTAINERS | 7 +
> > > arch/x86/kernel/amd_iommu_init.c | 2 +-
> > > arch/x86/kernel/pci-dma.c | 16 ---
> > > drivers/pci/dmar.c | 119 +++++++++++++-----
> > > drivers/pci/intel-iommu.c | 250 ++++++++++++++++++++------------------
> > > drivers/pci/quirks.c | 14 ++
> > > include/asm-x86/iommu.h | 4 +
> > > include/linux/dma_remapping.h | 27 ++--
> > > include/linux/intel-iommu.h | 66 ++++++++---
> > > 9 files changed, 305 insertions(+), 200 deletions(-)
> >
> > hm, i just updated to v2.6.28-rc1, and these changes broke the x86
> > 32-bit build:
> >
> > arch/x86/kernel/built-in.o: In function `dma_supported':
> > (.text+0x5797): undefined reference to `forbid_dac'
> > arch/x86/kernel/built-in.o: In function `iommu_setup':
> > pci-dma.c:(.init.text+0x326c): undefined reference to `forbid_dac'
> > pci-dma.c:(.init.text+0x328b): undefined reference to `forbid_dac'
> > pci-dma.c:(.init.text+0x32aa): undefined reference to `forbid_dac'
> >
> > seems to be caused by:
> >
> > 5b6985c: intel-iommu: IA64 support
>
> http://marc.info/?l=linux-kernel&m=122480590627590&w=2
>
>
> Sharing forbid_dac between IA64 and X86 doesn't make sense and IA64
> doesn't even use forbid_dac... Reverting the forbid_dac relocation is
> the right fix, I think.

could you send a patch for it please? Commit 5b6985c does many things at
once so the revert is not trivial.

Ingo

2008-10-24 11:37:09

by FUJITA Tomonori

[permalink] [raw]
Subject: Re: [GIT *] iommu fixes for 2.6.28

On Fri, 24 Oct 2008 13:22:17 +0200
Ingo Molnar <[email protected]> wrote:

> * FUJITA Tomonori <[email protected]> wrote:
>
> > On Fri, 24 Oct 2008 13:01:25 +0200
> > Ingo Molnar <[email protected]> wrote:
> >
> > >
> > > * David Woodhouse <[email protected]> wrote:
> > >
> > > > This contains a few iommu-related fixes -- it restores DMA remapping
> > > > on newer Intel hardware, which was disabled by the interrupt remapping
> > > > patches, adds IA64 support for the Intel IOMMU, and some other small
> > > > fixes.
> > > >
> > > > MAINTAINERS | 7 +
> > > > arch/x86/kernel/amd_iommu_init.c | 2 +-
> > > > arch/x86/kernel/pci-dma.c | 16 ---
> > > > drivers/pci/dmar.c | 119 +++++++++++++-----
> > > > drivers/pci/intel-iommu.c | 250 ++++++++++++++++++++------------------
> > > > drivers/pci/quirks.c | 14 ++
> > > > include/asm-x86/iommu.h | 4 +
> > > > include/linux/dma_remapping.h | 27 ++--
> > > > include/linux/intel-iommu.h | 66 ++++++++---
> > > > 9 files changed, 305 insertions(+), 200 deletions(-)
> > >
> > > hm, i just updated to v2.6.28-rc1, and these changes broke the x86
> > > 32-bit build:
> > >
> > > arch/x86/kernel/built-in.o: In function `dma_supported':
> > > (.text+0x5797): undefined reference to `forbid_dac'
> > > arch/x86/kernel/built-in.o: In function `iommu_setup':
> > > pci-dma.c:(.init.text+0x326c): undefined reference to `forbid_dac'
> > > pci-dma.c:(.init.text+0x328b): undefined reference to `forbid_dac'
> > > pci-dma.c:(.init.text+0x32aa): undefined reference to `forbid_dac'
> > >
> > > seems to be caused by:
> > >
> > > 5b6985c: intel-iommu: IA64 support
> >
> > http://marc.info/?l=linux-kernel&m=122480590627590&w=2
> >
> >
> > Sharing forbid_dac between IA64 and X86 doesn't make sense and IA64
> > doesn't even use forbid_dac... Reverting the forbid_dac relocation is
> > the right fix, I think.
>
> could you send a patch for it please? Commit 5b6985c does many things at
> once so the revert is not trivial.

The above Fenghua's patch exactly does what I said (reverting the
forbid_dac relocation, which the commit 5b6985c did).

2008-10-24 11:39:35

by Ingo Molnar

[permalink] [raw]
Subject: Re: [GIT *] iommu fixes for 2.6.28


* FUJITA Tomonori <[email protected]> wrote:

> On Fri, 24 Oct 2008 13:22:17 +0200
> Ingo Molnar <[email protected]> wrote:
>
> > * FUJITA Tomonori <[email protected]> wrote:
> >
> > > On Fri, 24 Oct 2008 13:01:25 +0200
> > > Ingo Molnar <[email protected]> wrote:
> > >
> > > >
> > > > * David Woodhouse <[email protected]> wrote:
> > > >
> > > > > This contains a few iommu-related fixes -- it restores DMA remapping
> > > > > on newer Intel hardware, which was disabled by the interrupt remapping
> > > > > patches, adds IA64 support for the Intel IOMMU, and some other small
> > > > > fixes.
> > > > >
> > > > > MAINTAINERS | 7 +
> > > > > arch/x86/kernel/amd_iommu_init.c | 2 +-
> > > > > arch/x86/kernel/pci-dma.c | 16 ---
> > > > > drivers/pci/dmar.c | 119 +++++++++++++-----
> > > > > drivers/pci/intel-iommu.c | 250 ++++++++++++++++++++------------------
> > > > > drivers/pci/quirks.c | 14 ++
> > > > > include/asm-x86/iommu.h | 4 +
> > > > > include/linux/dma_remapping.h | 27 ++--
> > > > > include/linux/intel-iommu.h | 66 ++++++++---
> > > > > 9 files changed, 305 insertions(+), 200 deletions(-)
> > > >
> > > > hm, i just updated to v2.6.28-rc1, and these changes broke the x86
> > > > 32-bit build:
> > > >
> > > > arch/x86/kernel/built-in.o: In function `dma_supported':
> > > > (.text+0x5797): undefined reference to `forbid_dac'
> > > > arch/x86/kernel/built-in.o: In function `iommu_setup':
> > > > pci-dma.c:(.init.text+0x326c): undefined reference to `forbid_dac'
> > > > pci-dma.c:(.init.text+0x328b): undefined reference to `forbid_dac'
> > > > pci-dma.c:(.init.text+0x32aa): undefined reference to `forbid_dac'
> > > >
> > > > seems to be caused by:
> > > >
> > > > 5b6985c: intel-iommu: IA64 support
> > >
> > > http://marc.info/?l=linux-kernel&m=122480590627590&w=2
> > >
> > >
> > > Sharing forbid_dac between IA64 and X86 doesn't make sense and IA64
> > > doesn't even use forbid_dac... Reverting the forbid_dac relocation is
> > > the right fix, I think.
> >
> > could you send a patch for it please? Commit 5b6985c does many things at
> > once so the revert is not trivial.
>
> The above Fenghua's patch exactly does what I said (reverting the
> forbid_dac relocation, which the commit 5b6985c did).

ah, cool - it's a partial revert and i assumed the 'revert' you
referenced was a full revert of 5b6985c.

This partial revert should go via the PCI tree i guess?

Ingo

2008-10-24 11:41:35

by Ingo Molnar

[permalink] [raw]
Subject: Re: [GIT *] iommu fixes for 2.6.28


* Ingo Molnar <[email protected]> wrote:

> i've applied the fix below to tip/x86/urgent.

i have zapped it, to not conflict with the better partial-revert pointed
out by Fujita.

Ingo