aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/scatterlist.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-01-30 07:30:21 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:30:21 -0500
commit3ebc51d7c95425c3b4667fa042576fb1c6e2ea16 (patch)
tree0d63faa0c3df10c1e55264e807b88ef844262fc0 /include/asm-x86/scatterlist.h
parentf28b8d608829aecd7343015a0df89f6b6e89d391 (diff)
x86: merge include/asm-x86/scatterlist.h
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/scatterlist.h')
-rw-r--r--include/asm-x86/scatterlist.h34
1 files changed, 32 insertions, 2 deletions
diff --git a/include/asm-x86/scatterlist.h b/include/asm-x86/scatterlist.h
index 3a1e76257a27..d13c197866d6 100644
--- a/include/asm-x86/scatterlist.h
+++ b/include/asm-x86/scatterlist.h
@@ -1,5 +1,35 @@
1#ifndef _ASM_X86_SCATTERLIST_H
2#define _ASM_X86_SCATTERLIST_H
3
4#include <asm/types.h>
5
6struct scatterlist {
7#ifdef CONFIG_DEBUG_SG
8 unsigned long sg_magic;
9#endif
10 unsigned long page_link;
11 unsigned int offset;
12 unsigned int length;
13 dma_addr_t dma_address;
14#ifdef CONFIG_X86_64
15 unsigned int dma_length;
16#endif
17};
18
19#define ARCH_HAS_SG_CHAIN
20#define ISA_DMA_THRESHOLD (0x00ffffff)
21
22/*
23 * These macros should be used after a pci_map_sg call has been done
24 * to get bus addresses of each of the SG entries and their lengths.
25 * You should only work with the number of sg entries pci_map_sg
26 * returns.
27 */
28#define sg_dma_address(sg) ((sg)->dma_address)
1#ifdef CONFIG_X86_32 29#ifdef CONFIG_X86_32
2# include "scatterlist_32.h" 30# define sg_dma_len(sg) ((sg)->length)
3#else 31#else
4# include "scatterlist_64.h" 32# define sg_dma_len(sg) ((sg)->dma_length)
33#endif
34
5#endif 35#endif