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>
This commit is contained in:
FUJITA Tomonori 2009-01-07 02:13:42 +09:00 committed by Ingo Molnar
parent 07716e4df2
commit c299030765
2 changed files with 5 additions and 5 deletions

View file

@ -13,6 +13,11 @@ extern struct dma_map_ops *dma_ops;
extern struct ia64_machine_vector ia64_mv;
extern void set_iommu_machvec(void);
extern void machvec_dma_sync_single(struct device *, dma_addr_t, size_t,
enum dma_data_direction);
extern void machvec_dma_sync_sg(struct device *, struct scatterlist *, int,
enum dma_data_direction);
static inline void *dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *daddr, gfp_t gfp)
{

View file

@ -23,7 +23,6 @@ struct task_struct;
struct pci_dev;
struct msi_desc;
struct dma_attrs;
enum dma_data_direction;
typedef void ia64_mv_setup_t (char **);
typedef void ia64_mv_cpu_init_t (void);
@ -97,10 +96,6 @@ machvec_noop_bus (struct pci_bus *bus)
extern void machvec_setup (char **);
extern void machvec_timer_interrupt (int, void *);
extern void machvec_dma_sync_single(struct device *, dma_addr_t, size_t,
enum dma_data_direction);
extern void machvec_dma_sync_sg(struct device *, struct scatterlist *, int,
enum dma_data_direction);
extern void machvec_tlb_migrate_finish (struct mm_struct *);
# if defined (CONFIG_IA64_HP_SIM)