Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198841
b: refs/heads/master
c: 18e9830
h: refs/heads/master
i:
  198839: 2e21039
v: v3
  • Loading branch information
FUJITA Tomonori authored and Linus Torvalds committed May 27, 2010
1 parent 424e76f commit a1d57fa
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 204f3a04449a9a775e465f7d87bcab08f170e59e
refs/heads/master: 18e98307de0d746cb0845ebf66535ce2184c25a2
3 changes: 3 additions & 0 deletions trunk/arch/ia64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,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"
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/sparc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,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
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/sparc/include/asm/scatterlist.h
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,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

Expand Down
13 changes: 5 additions & 8 deletions trunk/include/asm-generic/scatterlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

/*
Expand All @@ -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

Expand Down

0 comments on commit a1d57fa

Please sign in to comment.