From: Andrew Morton on
On Sun, 4 Apr 2010 23:25:50 +0900
FUJITA Tomonori <fujita.tomonori(a)lab.ntt.co.jp> wrote:

> There are only two ways to define sg_dma_len(); use sg->dma_length or
> sg->length. This patch introduces NEED_SG_DMA_LENGTH that enables
> architectures to choose sg->dma_length or sg->length.

i386 allnoconfig:

arch/x86/kernel/pci-nommu.c: In function 'nommu_map_sg':
arch/x86/kernel/pci-nommu.c:71: error: 'struct scatterlist' has no member named 'dma_length'

So I enabled NEED_SG_DMA_LENGTH on x86_32 as well. It compiles...

--- a/arch/x86/Kconfig~asm-generic-add-need_sg_dma_length-to-define-sg_dma_len-fix
+++ a/arch/x86/Kconfig
@@ -103,7 +103,7 @@ config NEED_DMA_MAP_STATE
def_bool (X86_64 || DMAR || DMA_API_DEBUG)

config NEED_SG_DMA_LENGTH
- def_bool X86_64
+ def_bool y

config GENERIC_ISA_DMA
def_bool y
diff -puN include/asm-generic/scatterlist.h~asm-generic-add-need_sg_dma_length-to-define-sg_dma_len-fix include/asm-generic/scatterlist.h
_

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: FUJITA Tomonori on
On Mon, 5 Apr 2010 16:35:41 -0700
Andrew Morton <akpm(a)linux-foundation.org> wrote:

> On Sun, 4 Apr 2010 23:25:50 +0900
> FUJITA Tomonori <fujita.tomonori(a)lab.ntt.co.jp> wrote:
>
> > There are only two ways to define sg_dma_len(); use sg->dma_length or
> > sg->length. This patch introduces NEED_SG_DMA_LENGTH that enables
> > architectures to choose sg->dma_length or sg->length.
>
> i386 allnoconfig:
>
> arch/x86/kernel/pci-nommu.c: In function 'nommu_map_sg':
> arch/x86/kernel/pci-nommu.c:71: error: 'struct scatterlist' has no member named 'dma_length'
>
> So I enabled NEED_SG_DMA_LENGTH on x86_32 as well. It compiles...

Sorry about that. The fix is fine by me. We can remove dma_length in
pci-nommu.c though (there is no point of setting dma_length here).

Thanks,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: FUJITA Tomonori on
On Tue, 6 Apr 2010 08:46:38 +0900
FUJITA Tomonori <fujita.tomonori(a)lab.ntt.co.jp> wrote:

> On Mon, 5 Apr 2010 16:35:41 -0700
> Andrew Morton <akpm(a)linux-foundation.org> wrote:
>
> > On Sun, 4 Apr 2010 23:25:50 +0900
> > FUJITA Tomonori <fujita.tomonori(a)lab.ntt.co.jp> wrote:
> >
> > > There are only two ways to define sg_dma_len(); use sg->dma_length or
> > > sg->length. This patch introduces NEED_SG_DMA_LENGTH that enables
> > > architectures to choose sg->dma_length or sg->length.
> >
> > i386 allnoconfig:
> >
> > arch/x86/kernel/pci-nommu.c: In function 'nommu_map_sg':
> > arch/x86/kernel/pci-nommu.c:71: error: 'struct scatterlist' has no member named 'dma_length'
> >
> > So I enabled NEED_SG_DMA_LENGTH on x86_32 as well. It compiles...
>
> Sorry about that. The fix is fine by me. We can remove dma_length in
> pci-nommu.c though (there is no point of setting dma_length here).

Oops, I forgot that pci-nommu.c is also used on x86_64.

There is no point of setting dma_length here on x86_32 but we need to
do on x86_64 since x86_64 uses dma_length. Your fix is correct.

Sorry again.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/