提交 f6ae31c2 编写于 作者: F FUJITA Tomonori 提交者: Linus Torvalds

parisc: use asm-generic/scatterlist.h

parisc uses iova and iova_length in scatterlist structure instead of
dma_address and dma_length.  However, the accessor are used so we can
convert parisc to use asm-generic/scatterlist.h easily.
Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Helge Deller <deller@gmx.de>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 7676679f
...@@ -98,6 +98,9 @@ config STACKTRACE_SUPPORT ...@@ -98,6 +98,9 @@ config STACKTRACE_SUPPORT
config NEED_DMA_MAP_STATE config NEED_DMA_MAP_STATE
def_bool y def_bool y
config NEED_SG_DMA_LENGTH
def_bool y
config ISA_DMA_API config ISA_DMA_API
bool bool
......
...@@ -3,25 +3,9 @@ ...@@ -3,25 +3,9 @@
#include <asm/page.h> #include <asm/page.h>
#include <asm/types.h> #include <asm/types.h>
#include <asm-generic/scatterlist.h>
struct scatterlist {
#ifdef CONFIG_DEBUG_SG
unsigned long sg_magic;
#endif
unsigned long page_link;
unsigned int offset;
unsigned int length;
/* an IOVA can be 64-bits on some PA-Risc platforms. */
dma_addr_t iova; /* I/O Virtual Address */
__u32 iova_length; /* bytes mapped */
};
#define sg_virt_addr(sg) ((unsigned long)sg_virt(sg))
#define sg_dma_address(sg) ((sg)->iova)
#define sg_dma_len(sg) ((sg)->iova_length)
#define ISA_DMA_THRESHOLD (~0UL) #define ISA_DMA_THRESHOLD (~0UL)
#define sg_virt_addr(sg) ((unsigned long)sg_virt(sg))
#endif /* _ASM_PARISC_SCATTERLIST_H */ #endif /* _ASM_PARISC_SCATTERLIST_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册