All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -mm 0/5] use asm-generic/scatterlist.h on every architecture
@ 2010-04-04 14:25 FUJITA Tomonori
  2010-04-04 14:25 ` [PATCH -mm 1/5] asm-generic: remove ISA_DMA_THRESHOLD in scatterlist.h FUJITA Tomonori
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: FUJITA Tomonori @ 2010-04-04 14:25 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, fujita.tomonori, arnd

This is the first half of the attempt to use asm-generic/scatterlist.h
on every architecture.

There are only two ways to define scatterlist structure. So it's easy
to convert every architecture to use asm-generic/scatterlist.h.

=
 arch/alpha/Kconfig                        |    3 +++
 arch/alpha/include/asm/scatterlist.h      |   21 +++------------------
 arch/arm/include/asm/scatterlist.h        |   20 ++------------------
 arch/ia64/Kconfig                         |    3 +++
 arch/microblaze/include/asm/scatterlist.h |    2 ++
 arch/powerpc/Kconfig                      |    3 +++
 arch/powerpc/include/asm/scatterlist.h    |   29 +----------------------------
 arch/s390/include/asm/scatterlist.h       |    2 ++
 arch/score/include/asm/scatterlist.h      |    2 ++
 arch/sh/Kconfig                           |    3 +++
 arch/sparc/Kconfig                        |    3 +++
 arch/sparc/include/asm/scatterlist.h      |    2 +-
 arch/x86/Kconfig                          |    3 +++
 include/asm-generic/scatterlist.h         |   15 ++++-----------
 14 files changed, 35 insertions(+), 76 deletions(-)



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH -mm 1/5] asm-generic: remove ISA_DMA_THRESHOLD in scatterlist.h
  2010-04-04 14:25 [PATCH -mm 0/5] use asm-generic/scatterlist.h on every architecture FUJITA Tomonori
@ 2010-04-04 14:25 ` FUJITA Tomonori
  2010-04-04 14:25 ` [PATCH -mm 2/5] asm-generic: add NEED_SG_DMA_LENGTH to define sg_dma_len() FUJITA Tomonori
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: FUJITA Tomonori @ 2010-04-04 14:25 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, fujita.tomonori, arnd

The trick for ISA_DMA_THRESHOLD in asm-generic/scatterlist.h doesn't
work for powerpc. This lets architectures defin ISA_DMA_THRESHOLD.

Hopefully, we can remove ISA_DMA_THRESHOLD in the future; we can do
better to decide if the bouncing is necessary or not.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Arnd Bergmann <arnd@arndb.de>
---
 arch/microblaze/include/asm/scatterlist.h |    2 ++
 arch/s390/include/asm/scatterlist.h       |    2 ++
 arch/score/include/asm/scatterlist.h      |    2 ++
 arch/sparc/include/asm/scatterlist.h      |    2 ++
 include/asm-generic/scatterlist.h         |    4 ----
 5 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/microblaze/include/asm/scatterlist.h b/arch/microblaze/include/asm/scatterlist.h
index 35d786f..be44d94 100644
--- a/arch/microblaze/include/asm/scatterlist.h
+++ b/arch/microblaze/include/asm/scatterlist.h
@@ -1 +1,3 @@
+#define ISA_DMA_THRESHOLD	(~0UL)
+
 #include <asm-generic/scatterlist.h>
diff --git a/arch/s390/include/asm/scatterlist.h b/arch/s390/include/asm/scatterlist.h
index 35d786f..be44d94 100644
--- a/arch/s390/include/asm/scatterlist.h
+++ b/arch/s390/include/asm/scatterlist.h
@@ -1 +1,3 @@
+#define ISA_DMA_THRESHOLD	(~0UL)
+
 #include <asm-generic/scatterlist.h>
diff --git a/arch/score/include/asm/scatterlist.h b/arch/score/include/asm/scatterlist.h
index 9f533b8..4fa1a66 100644
--- a/arch/score/include/asm/scatterlist.h
+++ b/arch/score/include/asm/scatterlist.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SCORE_SCATTERLIST_H
 #define _ASM_SCORE_SCATTERLIST_H
 
+#define ISA_DMA_THRESHOLD	(~0UL)
+
 #include <asm-generic/scatterlist.h>
 
 #endif /* _ASM_SCORE_SCATTERLIST_H */
diff --git a/arch/sparc/include/asm/scatterlist.h b/arch/sparc/include/asm/scatterlist.h
index d112025..0fa0d6d 100644
--- a/arch/sparc/include/asm/scatterlist.h
+++ b/arch/sparc/include/asm/scatterlist.h
@@ -3,6 +3,8 @@
 
 #define sg_dma_len(sg)     	((sg)->dma_length)
 
+#define ISA_DMA_THRESHOLD	(~0UL)
+
 #include <asm-generic/scatterlist.h>
 
 #endif /* !(_SPARC_SCATTERLIST_H) */
diff --git a/include/asm-generic/scatterlist.h b/include/asm-generic/scatterlist.h
index 8b94544..51a7a43 100644
--- a/include/asm-generic/scatterlist.h
+++ b/include/asm-generic/scatterlist.h
@@ -34,10 +34,6 @@ struct scatterlist {
 #endif /* 64 bit */
 #endif /* sg_dma_len */
 
-#ifndef ISA_DMA_THRESHOLD
-#define ISA_DMA_THRESHOLD	(~0UL)
-#endif
-
 #define ARCH_HAS_SG_CHAIN
 
 #endif /* __ASM_GENERIC_SCATTERLIST_H */
-- 
1.7.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH -mm 2/5] asm-generic: add NEED_SG_DMA_LENGTH to define sg_dma_len()
  2010-04-04 14:25 [PATCH -mm 0/5] use asm-generic/scatterlist.h on every architecture FUJITA Tomonori
  2010-04-04 14:25 ` [PATCH -mm 1/5] asm-generic: remove ISA_DMA_THRESHOLD in scatterlist.h FUJITA Tomonori
@ 2010-04-04 14:25 ` FUJITA Tomonori
  2010-04-05 23:35   ` Andrew Morton
  2010-04-04 14:25 ` [PATCH -mm 3/5] powerpc: use asm-generic/scatterlist.h FUJITA Tomonori
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: FUJITA Tomonori @ 2010-04-04 14:25 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, fujita.tomonori, arnd

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.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Arnd Bergmann <arnd@arndb.de>
---
 arch/ia64/Kconfig                    |    3 +++
 arch/sh/Kconfig                      |    3 +++
 arch/sparc/Kconfig                   |    3 +++
 arch/sparc/include/asm/scatterlist.h |    2 --
 arch/x86/Kconfig                     |    3 +++
 include/asm-generic/scatterlist.h    |   13 +++++--------
 6 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 0e5919f..0873a10 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -56,6 +56,9 @@ config MMU
 config NEED_DMA_MAP_STATE
 	def_bool y
 
+config NEED_SG_DMA_LENGTH
+	def_bool y
+
 config SWIOTLB
        bool
 
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index e2e5b3b..5e2ee0c 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -183,6 +183,9 @@ config DMA_NONCOHERENT
 config NEED_DMA_MAP_STATE
 	def_bool DMA_NONCOHERENT
 
+config NEED_SG_DMA_LENGTH
+	def_bool y
+
 source "init/Kconfig"
 
 source "kernel/Kconfig.freezer"
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 54ce709..5b751a5 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -127,6 +127,9 @@ config ZONE_DMA
 config NEED_DMA_MAP_STATE
 	def_bool y
 
+config NEED_SG_DMA_LENGTH
+	def_bool y
+
 config GENERIC_ISA_DMA
 	bool
 	default y if SPARC32
diff --git a/arch/sparc/include/asm/scatterlist.h b/arch/sparc/include/asm/scatterlist.h
index 0fa0d6d..69d21bb 100644
--- a/arch/sparc/include/asm/scatterlist.h
+++ b/arch/sparc/include/asm/scatterlist.h
@@ -1,8 +1,6 @@
 #ifndef _SPARC_SCATTERLIST_H
 #define _SPARC_SCATTERLIST_H
 
-#define sg_dma_len(sg)     	((sg)->dma_length)
-
 #define ISA_DMA_THRESHOLD	(~0UL)
 
 #include <asm-generic/scatterlist.h>
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 8b182ea..6dc69c4 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -102,6 +102,9 @@ config SBUS
 config NEED_DMA_MAP_STATE
        def_bool (X86_64 || DMAR || DMA_API_DEBUG)
 
+config NEED_SG_DMA_LENGTH
+	def_bool X86_64
+
 config GENERIC_ISA_DMA
 	def_bool y
 
diff --git a/include/asm-generic/scatterlist.h b/include/asm-generic/scatterlist.h
index 51a7a43..5e08794 100644
--- a/include/asm-generic/scatterlist.h
+++ b/include/asm-generic/scatterlist.h
@@ -11,7 +11,9 @@ struct scatterlist {
 	unsigned int	offset;
 	unsigned int	length;
 	dma_addr_t	dma_address;
+#ifdef CONFIG_NEED_SG_DMA_LENGTH
 	unsigned int	dma_length;
+#endif
 };
 
 /*
@@ -22,17 +24,12 @@ struct scatterlist {
  * is 0.
  */
 #define sg_dma_address(sg)	((sg)->dma_address)
-#ifndef sg_dma_len
-/*
- * Normally, you have an iommu on 64 bit machines, but not on 32 bit
- * machines. Architectures that are differnt should override this.
- */
-#if __BITS_PER_LONG == 64
+
+#ifdef CONFIG_NEED_SG_DMA_LENGTH
 #define sg_dma_len(sg)		((sg)->dma_length)
 #else
 #define sg_dma_len(sg)		((sg)->length)
-#endif /* 64 bit */
-#endif /* sg_dma_len */
+#endif
 
 #define ARCH_HAS_SG_CHAIN
 
-- 
1.7.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH -mm 3/5] powerpc: use asm-generic/scatterlist.h
  2010-04-04 14:25 [PATCH -mm 0/5] use asm-generic/scatterlist.h on every architecture FUJITA Tomonori
  2010-04-04 14:25 ` [PATCH -mm 1/5] asm-generic: remove ISA_DMA_THRESHOLD in scatterlist.h FUJITA Tomonori
  2010-04-04 14:25 ` [PATCH -mm 2/5] asm-generic: add NEED_SG_DMA_LENGTH to define sg_dma_len() FUJITA Tomonori
@ 2010-04-04 14:25 ` FUJITA Tomonori
  2010-04-04 14:25 ` [PATCH -mm 4/5] arm: " FUJITA Tomonori
  2010-04-04 14:25 ` [PATCH -mm 5/5] alpha: " FUJITA Tomonori
  4 siblings, 0 replies; 9+ messages in thread
From: FUJITA Tomonori @ 2010-04-04 14:25 UTC (permalink / raw)
  To: akpm
  Cc: linux-kernel, fujita.tomonori, arnd, Benjamin Herrenschmidt,
	Paul Mackerras

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
---
 arch/powerpc/Kconfig                   |    3 +++
 arch/powerpc/include/asm/scatterlist.h |   29 +----------------------------
 2 files changed, 4 insertions(+), 28 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 669a1b1..0133cf9 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -659,6 +659,9 @@ config ZONE_DMA
 config NEED_DMA_MAP_STATE
 	def_bool (PPC64 || NOT_COHERENT_CACHE)
 
+config NEED_SG_DMA_LENGTH
+	def_bool y
+
 config GENERIC_ISA_DMA
 	bool
 	depends on PPC64 || POWER4 || 6xx && !CPM2
diff --git a/arch/powerpc/include/asm/scatterlist.h b/arch/powerpc/include/asm/scatterlist.h
index 912bf59..4ae35da 100644
--- a/arch/powerpc/include/asm/scatterlist.h
+++ b/arch/powerpc/include/asm/scatterlist.h
@@ -9,38 +9,11 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#ifdef __KERNEL__
-#include <linux/types.h>
 #include <asm/dma.h>
-
-struct scatterlist {
-#ifdef CONFIG_DEBUG_SG
-	unsigned long sg_magic;
-#endif
-	unsigned long page_link;
-	unsigned int offset;
-	unsigned int length;
-
-	/* For TCE or SWIOTLB support */
-	dma_addr_t dma_address;
-	u32 dma_length;
-};
-
-/*
- * These macros should be used after a dma_map_sg call has been done
- * to get bus addresses of each of the SG entries and their lengths.
- * You should only work with the number of sg entries pci_map_sg
- * returns, or alternatively stop on the first sg_dma_len(sg) which
- * is 0.
- */
-#define sg_dma_address(sg)	((sg)->dma_address)
-#define sg_dma_len(sg)		((sg)->dma_length)
+#include <asm-generic/scatterlist.h>
 
 #ifdef __powerpc64__
 #define ISA_DMA_THRESHOLD	(~0UL)
 #endif
 
-#define ARCH_HAS_SG_CHAIN
-
-#endif /* __KERNEL__ */
 #endif /* _ASM_POWERPC_SCATTERLIST_H */
-- 
1.7.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH -mm 4/5] arm: use asm-generic/scatterlist.h
  2010-04-04 14:25 [PATCH -mm 0/5] use asm-generic/scatterlist.h on every architecture FUJITA Tomonori
                   ` (2 preceding siblings ...)
  2010-04-04 14:25 ` [PATCH -mm 3/5] powerpc: use asm-generic/scatterlist.h FUJITA Tomonori
@ 2010-04-04 14:25 ` FUJITA Tomonori
  2010-04-04 14:25 ` [PATCH -mm 5/5] alpha: " FUJITA Tomonori
  4 siblings, 0 replies; 9+ messages in thread
From: FUJITA Tomonori @ 2010-04-04 14:25 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, fujita.tomonori, arnd, Russell King

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Russell King <linux@arm.linux.org.uk>
---
 arch/arm/include/asm/scatterlist.h |   20 ++------------------
 1 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/arch/arm/include/asm/scatterlist.h b/arch/arm/include/asm/scatterlist.h
index ca0a37d..bcda59f 100644
--- a/arch/arm/include/asm/scatterlist.h
+++ b/arch/arm/include/asm/scatterlist.h
@@ -4,24 +4,8 @@
 #include <asm/memory.h>
 #include <asm/types.h>
 
-struct scatterlist {
-#ifdef CONFIG_DEBUG_SG
-	unsigned long	sg_magic;
-#endif
-	unsigned long	page_link;
-	unsigned int	offset;		/* buffer offset		 */
-	dma_addr_t	dma_address;	/* dma address			 */
-	unsigned int	length;		/* length			 */
-};
+#include <asm-generic/scatterlist.h>
 
-/*
- * These macros should be used after a pci_map_sg call has been done
- * to get bus addresses of each of the SG entries and their lengths.
- * You should only work with the number of sg entries pci_map_sg
- * returns, or alternatively stop on the first sg_dma_len(sg) which
- * is 0.
- */
-#define sg_dma_address(sg)      ((sg)->dma_address)
-#define sg_dma_len(sg)          ((sg)->length)
+#undef ARCH_HAS_SG_CHAIN
 
 #endif /* _ASMARM_SCATTERLIST_H */
-- 
1.7.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH -mm 5/5] alpha: use asm-generic/scatterlist.h
  2010-04-04 14:25 [PATCH -mm 0/5] use asm-generic/scatterlist.h on every architecture FUJITA Tomonori
                   ` (3 preceding siblings ...)
  2010-04-04 14:25 ` [PATCH -mm 4/5] arm: " FUJITA Tomonori
@ 2010-04-04 14:25 ` FUJITA Tomonori
  4 siblings, 0 replies; 9+ messages in thread
From: FUJITA Tomonori @ 2010-04-04 14:25 UTC (permalink / raw)
  To: akpm
  Cc: linux-kernel, fujita.tomonori, arnd, Richard Henderson,
	Ivan Kokshaysky, Matt Turner

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
---
 arch/alpha/Kconfig                   |    3 +++
 arch/alpha/include/asm/scatterlist.h |   21 +++------------------
 2 files changed, 6 insertions(+), 18 deletions(-)

diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index d1a1d83..ffc8253 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -58,6 +58,9 @@ config ZONE_DMA
 config NEED_DMA_MAP_STATE
        def_bool y
 
+config NEED_SG_DMA_LENGTH
+	def_bool y
+
 config GENERIC_ISA_DMA
 	bool
 	default y
diff --git a/arch/alpha/include/asm/scatterlist.h b/arch/alpha/include/asm/scatterlist.h
index 440747c..85a0ef2 100644
--- a/arch/alpha/include/asm/scatterlist.h
+++ b/arch/alpha/include/asm/scatterlist.h
@@ -1,25 +1,10 @@
 #ifndef _ALPHA_SCATTERLIST_H
 #define _ALPHA_SCATTERLIST_H
 
-#include <asm/page.h>
-#include <asm/types.h>
-  
-struct scatterlist {
-#ifdef CONFIG_DEBUG_SG
-	unsigned long sg_magic;
-#endif
-	unsigned long page_link;
-	unsigned int offset;
-
-	unsigned int length;
-
-	dma_addr_t dma_address;
-	__u32 dma_length;
-};
+#define ISA_DMA_THRESHOLD (~0UL)
 
-#define sg_dma_address(sg)	((sg)->dma_address)
-#define sg_dma_len(sg)		((sg)->dma_length)
+#include <asm-generic/scatterlist.h>
 
-#define ISA_DMA_THRESHOLD (~0UL)
+#undef ARCH_HAS_SG_CHAIN
 
 #endif /* !(_ALPHA_SCATTERLIST_H) */
-- 
1.7.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH -mm 2/5] asm-generic: add NEED_SG_DMA_LENGTH to define sg_dma_len()
  2010-04-04 14:25 ` [PATCH -mm 2/5] asm-generic: add NEED_SG_DMA_LENGTH to define sg_dma_len() FUJITA Tomonori
@ 2010-04-05 23:35   ` Andrew Morton
  2010-04-05 23:46     ` FUJITA Tomonori
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Morton @ 2010-04-05 23:35 UTC (permalink / raw)
  To: FUJITA Tomonori; +Cc: linux-kernel, arnd

On Sun,  4 Apr 2010 23:25:50 +0900
FUJITA Tomonori <fujita.tomonori@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
_


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH -mm 2/5] asm-generic: add NEED_SG_DMA_LENGTH to define sg_dma_len()
  2010-04-05 23:35   ` Andrew Morton
@ 2010-04-05 23:46     ` FUJITA Tomonori
  2010-04-06  0:05       ` FUJITA Tomonori
  0 siblings, 1 reply; 9+ messages in thread
From: FUJITA Tomonori @ 2010-04-05 23:46 UTC (permalink / raw)
  To: akpm; +Cc: fujita.tomonori, linux-kernel, arnd

On Mon, 5 Apr 2010 16:35:41 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:

> On Sun,  4 Apr 2010 23:25:50 +0900
> FUJITA Tomonori <fujita.tomonori@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,

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH -mm 2/5] asm-generic: add NEED_SG_DMA_LENGTH to define sg_dma_len()
  2010-04-05 23:46     ` FUJITA Tomonori
@ 2010-04-06  0:05       ` FUJITA Tomonori
  0 siblings, 0 replies; 9+ messages in thread
From: FUJITA Tomonori @ 2010-04-06  0:05 UTC (permalink / raw)
  To: fujita.tomonori; +Cc: akpm, linux-kernel, arnd

On Tue, 6 Apr 2010 08:46:38 +0900
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> wrote:

> On Mon, 5 Apr 2010 16:35:41 -0700
> Andrew Morton <akpm@linux-foundation.org> wrote:
> 
> > On Sun,  4 Apr 2010 23:25:50 +0900
> > FUJITA Tomonori <fujita.tomonori@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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-04-06  0:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-04 14:25 [PATCH -mm 0/5] use asm-generic/scatterlist.h on every architecture FUJITA Tomonori
2010-04-04 14:25 ` [PATCH -mm 1/5] asm-generic: remove ISA_DMA_THRESHOLD in scatterlist.h FUJITA Tomonori
2010-04-04 14:25 ` [PATCH -mm 2/5] asm-generic: add NEED_SG_DMA_LENGTH to define sg_dma_len() FUJITA Tomonori
2010-04-05 23:35   ` Andrew Morton
2010-04-05 23:46     ` FUJITA Tomonori
2010-04-06  0:05       ` FUJITA Tomonori
2010-04-04 14:25 ` [PATCH -mm 3/5] powerpc: use asm-generic/scatterlist.h FUJITA Tomonori
2010-04-04 14:25 ` [PATCH -mm 4/5] arm: " FUJITA Tomonori
2010-04-04 14:25 ` [PATCH -mm 5/5] alpha: " FUJITA Tomonori

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.