aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2009-01-06 12:13:42 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-07 07:48:21 -0500
commitc299030765292434b73572f9bcfe84951ff06614 (patch)
treec86565b5f780a0c0320a2958508a8be42d11891c
parent07716e4df25523bf85b4e304d2cf63dbf3cbabf9 (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.h5
-rw-r--r--arch/ia64/include/asm/machvec.h5
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;
13extern struct ia64_machine_vector ia64_mv; 13extern struct ia64_machine_vector ia64_mv;
14extern void set_iommu_machvec(void); 14extern void set_iommu_machvec(void);
15 15
16extern void machvec_dma_sync_single(struct device *, dma_addr_t, size_t,
17 enum dma_data_direction);
18extern void machvec_dma_sync_sg(struct device *, struct scatterlist *, int,
19 enum dma_data_direction);
20
16static inline void *dma_alloc_coherent(struct device *dev, size_t size, 21static 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;
23struct pci_dev; 23struct pci_dev;
24struct msi_desc; 24struct msi_desc;
25struct dma_attrs; 25struct dma_attrs;
26enum dma_data_direction;
27 26
28typedef void ia64_mv_setup_t (char **); 27typedef void ia64_mv_setup_t (char **);
29typedef void ia64_mv_cpu_init_t (void); 28typedef void ia64_mv_cpu_init_t (void);
@@ -97,10 +96,6 @@ machvec_noop_bus (struct pci_bus *bus)
97 96
98extern void machvec_setup (char **); 97extern void machvec_setup (char **);
99extern void machvec_timer_interrupt (int, void *); 98extern void machvec_timer_interrupt (int, void *);
100extern void machvec_dma_sync_single(struct device *, dma_addr_t, size_t,
101 enum dma_data_direction);
102extern void machvec_dma_sync_sg(struct device *, struct scatterlist *, int,
103 enum dma_data_direction);
104extern void machvec_tlb_migrate_finish (struct mm_struct *); 99extern void machvec_tlb_migrate_finish (struct mm_struct *);
105 100
106# if defined (CONFIG_IA64_HP_SIM) 101# if defined (CONFIG_IA64_HP_SIM)