diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2009-01-05 09:47:21 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-06 08:06:53 -0500 |
commit | abe6602bf197167efb3b37161b9c11748fa076e1 (patch) | |
tree | 669d4b83923ed3ff6b2fc70e5293bc5a7c458786 | |
parent | 055bcf99a1471ff0a2ef24863098f946a09c9161 (diff) |
x86: add map_page and unmap_page to struct dma_mapping_ops
This patch adds map_page and unmap_page to struct dma_mapping_ops.
This is a preparation of struct dma_mapping_ops unification. We use
map_page and unmap_page instead of map_single and unmap_single.
We will remove map_single and unmap_single hooks in the last patch in
this patchset.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/include/asm/dma-mapping.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h index 4035357f5b9d..3fe05046fb31 100644 --- a/arch/x86/include/asm/dma-mapping.h +++ b/arch/x86/include/asm/dma-mapping.h | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/scatterlist.h> | 9 | #include <linux/scatterlist.h> |
10 | #include <linux/dma-attrs.h> | ||
10 | #include <asm/io.h> | 11 | #include <asm/io.h> |
11 | #include <asm/swiotlb.h> | 12 | #include <asm/swiotlb.h> |
12 | #include <asm-generic/dma-coherent.h> | 13 | #include <asm-generic/dma-coherent.h> |
@@ -50,6 +51,13 @@ struct dma_mapping_ops { | |||
50 | void (*unmap_sg)(struct device *hwdev, | 51 | void (*unmap_sg)(struct device *hwdev, |
51 | struct scatterlist *sg, int nents, | 52 | struct scatterlist *sg, int nents, |
52 | int direction); | 53 | int direction); |
54 | dma_addr_t (*map_page)(struct device *dev, struct page *page, | ||
55 | unsigned long offset, size_t size, | ||
56 | enum dma_data_direction dir, | ||
57 | struct dma_attrs *attrs); | ||
58 | void (*unmap_page)(struct device *dev, dma_addr_t dma_handle, | ||
59 | size_t size, enum dma_data_direction dir, | ||
60 | struct dma_attrs *attrs); | ||
53 | int (*dma_supported)(struct device *hwdev, u64 mask); | 61 | int (*dma_supported)(struct device *hwdev, u64 mask); |
54 | int is_phys; | 62 | int is_phys; |
55 | }; | 63 | }; |