diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2009-01-06 12:13:42 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-07 07:48:21 -0500 |
commit | c299030765292434b73572f9bcfe84951ff06614 (patch) | |
tree | c86565b5f780a0c0320a2958508a8be42d11891c | |
parent | 07716e4df25523bf85b4e304d2cf63dbf3cbabf9 (diff) |
convert to use generic dma_map_ops struct, cleanup
Ingo Molnar <mingo@elte.hu> wrote:
> looks good on x86 but on ia64 there's a problem with one of the
> prototypes:
>
> In file included from tip/arch/ia64/include/asm/io.h:72,
> from tip/arch/ia64/include/asm/smp.h:20,
> from tip/include/linux/smp.h:33,
> from tip/include/linux/sched.h:68,
> from tip/arch/ia64/kernel/asm-offsets.c:9:
> tip/arch/ia64/include/asm/machvec.h:101: warning: parameter has incomplete type
> tip/arch/ia64/include/asm/machvec.h:103: warning: parameter has incomplete type
>
> that's about "enum dma_data_direction".
>
> I dont think enums can be forward declared like that.
>
> machvec.h is a fairly lowlevel include file - so including
> linux/dma-mapping.h probably wont work. We could do a
> linux/dma-mapping-types.h file that is more lowlevel, or we could move the
> machvec_dma_sync_single() and machvec_dma_sync_sg() declarations to a more
> highlevel file - like arch/ia64/include/asm/dma-mapping.h.
>
> To me the latter looks cleaner but no strong feelings.
Yeah, agreed.
They are generic IA64 DMA operations so I think that it makes sense to
move them to dma-mapping.h.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/ia64/include/asm/dma-mapping.h | 5 | ||||
-rw-r--r-- | arch/ia64/include/asm/machvec.h | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h index d6230f514536..f4d4b1850a7e 100644 --- a/arch/ia64/include/asm/dma-mapping.h +++ b/arch/ia64/include/asm/dma-mapping.h | |||
@@ -13,6 +13,11 @@ extern struct dma_map_ops *dma_ops; | |||
13 | extern struct ia64_machine_vector ia64_mv; | 13 | extern struct ia64_machine_vector ia64_mv; |
14 | extern void set_iommu_machvec(void); | 14 | extern void set_iommu_machvec(void); |
15 | 15 | ||
16 | extern void machvec_dma_sync_single(struct device *, dma_addr_t, size_t, | ||
17 | enum dma_data_direction); | ||
18 | extern void machvec_dma_sync_sg(struct device *, struct scatterlist *, int, | ||
19 | enum dma_data_direction); | ||
20 | |||
16 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, | 21 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, |
17 | dma_addr_t *daddr, gfp_t gfp) | 22 | dma_addr_t *daddr, gfp_t gfp) |
18 | { | 23 | { |
diff --git a/arch/ia64/include/asm/machvec.h b/arch/ia64/include/asm/machvec.h index e8442c7e4cc8..22a75fb55adb 100644 --- a/arch/ia64/include/asm/machvec.h +++ b/arch/ia64/include/asm/machvec.h | |||
@@ -23,7 +23,6 @@ struct task_struct; | |||
23 | struct pci_dev; | 23 | struct pci_dev; |
24 | struct msi_desc; | 24 | struct msi_desc; |
25 | struct dma_attrs; | 25 | struct dma_attrs; |
26 | enum dma_data_direction; | ||
27 | 26 | ||
28 | typedef void ia64_mv_setup_t (char **); | 27 | typedef void ia64_mv_setup_t (char **); |
29 | typedef void ia64_mv_cpu_init_t (void); | 28 | typedef void ia64_mv_cpu_init_t (void); |
@@ -97,10 +96,6 @@ machvec_noop_bus (struct pci_bus *bus) | |||
97 | 96 | ||
98 | extern void machvec_setup (char **); | 97 | extern void machvec_setup (char **); |
99 | extern void machvec_timer_interrupt (int, void *); | 98 | extern void machvec_timer_interrupt (int, void *); |
100 | extern void machvec_dma_sync_single(struct device *, dma_addr_t, size_t, | ||
101 | enum dma_data_direction); | ||
102 | extern void machvec_dma_sync_sg(struct device *, struct scatterlist *, int, | ||
103 | enum dma_data_direction); | ||
104 | extern void machvec_tlb_migrate_finish (struct mm_struct *); | 99 | extern void machvec_tlb_migrate_finish (struct mm_struct *); |
105 | 100 | ||
106 | # if defined (CONFIG_IA64_HP_SIM) | 101 | # if defined (CONFIG_IA64_HP_SIM) |