Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fad6a029 authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by Ingo Molnar
Browse files

remove dma operations in struct ia64_machine_vector



We don't need dma operation hooks in struct ia64_machine_vector
now. This also removes unused ia64_mv_dma_* typedefs.

Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: default avatarTony Luck <tony.luck@intel.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent b7ea6e95
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -22,14 +22,18 @@ extern int swiotlb_late_init_with_default_size (size_t size);

/* hwiommu declarations & definitions: */

extern ia64_mv_dma_alloc_coherent	sba_alloc_coherent;
extern ia64_mv_dma_free_coherent	sba_free_coherent;
extern ia64_mv_dma_map_single_attrs	sba_map_single_attrs;
extern ia64_mv_dma_unmap_single_attrs	sba_unmap_single_attrs;
extern ia64_mv_dma_map_sg_attrs		sba_map_sg_attrs;
extern ia64_mv_dma_unmap_sg_attrs	sba_unmap_sg_attrs;
extern ia64_mv_dma_supported		sba_dma_supported;
extern ia64_mv_dma_mapping_error	sba_dma_mapping_error;
extern void *sba_alloc_coherent(struct device *, size_t, dma_addr_t *, gfp_t);
extern void sba_free_coherent (struct device *, size_t, void *, dma_addr_t);
extern dma_addr_t sba_map_single_attrs(struct device *, void *, size_t, int,
				       struct dma_attrs *);
extern void sba_unmap_single_attrs(struct device *, dma_addr_t, size_t, int,
				   struct dma_attrs *);
extern int sba_map_sg_attrs(struct device *, struct scatterlist *, int, int,
			    struct dma_attrs *);
extern void sba_unmap_sg_attrs(struct device *, struct scatterlist *, int, int,
			       struct dma_attrs *);
extern int sba_dma_supported (struct device *, u64);
extern int sba_dma_mapping_error(struct device *, dma_addr_t);

#define hwiommu_alloc_coherent		sba_alloc_coherent
#define hwiommu_free_coherent		sba_free_coherent
+0 −89
Original line number Diff line number Diff line
@@ -45,23 +45,6 @@ typedef void ia64_mv_kernel_launch_event_t(void);

/* DMA-mapping interface: */
typedef void ia64_mv_dma_init (void);
typedef void *ia64_mv_dma_alloc_coherent (struct device *, size_t, dma_addr_t *, gfp_t);
typedef void ia64_mv_dma_free_coherent (struct device *, size_t, void *, dma_addr_t);
typedef dma_addr_t ia64_mv_dma_map_single (struct device *, void *, size_t, int);
typedef void ia64_mv_dma_unmap_single (struct device *, dma_addr_t, size_t, int);
typedef int ia64_mv_dma_map_sg (struct device *, struct scatterlist *, int, int);
typedef void ia64_mv_dma_unmap_sg (struct device *, struct scatterlist *, int, int);
typedef void ia64_mv_dma_sync_single_for_cpu (struct device *, dma_addr_t, size_t, int);
typedef void ia64_mv_dma_sync_sg_for_cpu (struct device *, struct scatterlist *, int, int);
typedef void ia64_mv_dma_sync_single_for_device (struct device *, dma_addr_t, size_t, int);
typedef void ia64_mv_dma_sync_sg_for_device (struct device *, struct scatterlist *, int, int);
typedef int ia64_mv_dma_mapping_error(struct device *, dma_addr_t dma_addr);
typedef int ia64_mv_dma_supported (struct device *, u64);

typedef dma_addr_t ia64_mv_dma_map_single_attrs (struct device *, void *, size_t, int, struct dma_attrs *);
typedef void ia64_mv_dma_unmap_single_attrs (struct device *, dma_addr_t, size_t, int, struct dma_attrs *);
typedef int ia64_mv_dma_map_sg_attrs (struct device *, struct scatterlist *, int, int, struct dma_attrs *);
typedef void ia64_mv_dma_unmap_sg_attrs (struct device *, struct scatterlist *, int, int, struct dma_attrs *);

/*
 * WARNING: The legacy I/O space is _architected_.  Platforms are
@@ -147,18 +130,6 @@ extern void machvec_tlb_migrate_finish (struct mm_struct *);
#  define platform_global_tlb_purge	ia64_mv.global_tlb_purge
#  define platform_tlb_migrate_finish	ia64_mv.tlb_migrate_finish
#  define platform_dma_init		ia64_mv.dma_init
#  define platform_dma_alloc_coherent	ia64_mv.dma_alloc_coherent
#  define platform_dma_free_coherent	ia64_mv.dma_free_coherent
#  define platform_dma_map_single_attrs	ia64_mv.dma_map_single_attrs
#  define platform_dma_unmap_single_attrs	ia64_mv.dma_unmap_single_attrs
#  define platform_dma_map_sg_attrs	ia64_mv.dma_map_sg_attrs
#  define platform_dma_unmap_sg_attrs	ia64_mv.dma_unmap_sg_attrs
#  define platform_dma_sync_single_for_cpu ia64_mv.dma_sync_single_for_cpu
#  define platform_dma_sync_sg_for_cpu	ia64_mv.dma_sync_sg_for_cpu
#  define platform_dma_sync_single_for_device ia64_mv.dma_sync_single_for_device
#  define platform_dma_sync_sg_for_device ia64_mv.dma_sync_sg_for_device
#  define platform_dma_mapping_error		ia64_mv.dma_mapping_error
#  define platform_dma_supported	ia64_mv.dma_supported
#  define platform_irq_to_vector	ia64_mv.irq_to_vector
#  define platform_local_vector_to_irq	ia64_mv.local_vector_to_irq
#  define platform_pci_get_legacy_mem	ia64_mv.pci_get_legacy_mem
@@ -201,18 +172,6 @@ struct ia64_machine_vector {
	ia64_mv_global_tlb_purge_t *global_tlb_purge;
	ia64_mv_tlb_migrate_finish_t *tlb_migrate_finish;
	ia64_mv_dma_init *dma_init;
	ia64_mv_dma_alloc_coherent *dma_alloc_coherent;
	ia64_mv_dma_free_coherent *dma_free_coherent;
	ia64_mv_dma_map_single_attrs *dma_map_single_attrs;
	ia64_mv_dma_unmap_single_attrs *dma_unmap_single_attrs;
	ia64_mv_dma_map_sg_attrs *dma_map_sg_attrs;
	ia64_mv_dma_unmap_sg_attrs *dma_unmap_sg_attrs;
	ia64_mv_dma_sync_single_for_cpu *dma_sync_single_for_cpu;
	ia64_mv_dma_sync_sg_for_cpu *dma_sync_sg_for_cpu;
	ia64_mv_dma_sync_single_for_device *dma_sync_single_for_device;
	ia64_mv_dma_sync_sg_for_device *dma_sync_sg_for_device;
	ia64_mv_dma_mapping_error *dma_mapping_error;
	ia64_mv_dma_supported *dma_supported;
	ia64_mv_irq_to_vector *irq_to_vector;
	ia64_mv_local_vector_to_irq *local_vector_to_irq;
	ia64_mv_pci_get_legacy_mem_t *pci_get_legacy_mem;
@@ -251,18 +210,6 @@ struct ia64_machine_vector {
	platform_global_tlb_purge,		\
	platform_tlb_migrate_finish,		\
	platform_dma_init,			\
	platform_dma_alloc_coherent,		\
	platform_dma_free_coherent,		\
	platform_dma_map_single_attrs,		\
	platform_dma_unmap_single_attrs,	\
	platform_dma_map_sg_attrs,		\
	platform_dma_unmap_sg_attrs,		\
	platform_dma_sync_single_for_cpu,	\
	platform_dma_sync_sg_for_cpu,		\
	platform_dma_sync_single_for_device,	\
	platform_dma_sync_sg_for_device,	\
	platform_dma_mapping_error,			\
	platform_dma_supported,			\
	platform_irq_to_vector,			\
	platform_local_vector_to_irq,		\
	platform_pci_get_legacy_mem,		\
@@ -332,42 +279,6 @@ extern void swiotlb_dma_init(void);
#ifndef platform_dma_init
# define platform_dma_init		swiotlb_dma_init
#endif
#ifndef platform_dma_alloc_coherent
# define platform_dma_alloc_coherent	swiotlb_alloc_coherent
#endif
#ifndef platform_dma_free_coherent
# define platform_dma_free_coherent	swiotlb_free_coherent
#endif
#ifndef platform_dma_map_single_attrs
# define platform_dma_map_single_attrs	swiotlb_map_single_attrs
#endif
#ifndef platform_dma_unmap_single_attrs
# define platform_dma_unmap_single_attrs	swiotlb_unmap_single_attrs
#endif
#ifndef platform_dma_map_sg_attrs
# define platform_dma_map_sg_attrs	swiotlb_map_sg_attrs
#endif
#ifndef platform_dma_unmap_sg_attrs
# define platform_dma_unmap_sg_attrs	swiotlb_unmap_sg_attrs
#endif
#ifndef platform_dma_sync_single_for_cpu
# define platform_dma_sync_single_for_cpu	swiotlb_sync_single_for_cpu
#endif
#ifndef platform_dma_sync_sg_for_cpu
# define platform_dma_sync_sg_for_cpu		swiotlb_sync_sg_for_cpu
#endif
#ifndef platform_dma_sync_single_for_device
# define platform_dma_sync_single_for_device	swiotlb_sync_single_for_device
#endif
#ifndef platform_dma_sync_sg_for_device
# define platform_dma_sync_sg_for_device	swiotlb_sync_sg_for_device
#endif
#ifndef platform_dma_mapping_error
# define platform_dma_mapping_error		swiotlb_dma_mapping_error
#endif
#ifndef platform_dma_supported
# define  platform_dma_supported	swiotlb_dma_supported
#endif
#ifndef platform_irq_to_vector
# define platform_irq_to_vector		__ia64_irq_to_vector
#endif
+0 −20
Original line number Diff line number Diff line
@@ -2,14 +2,6 @@
#define _ASM_IA64_MACHVEC_DIG_VTD_h

extern ia64_mv_setup_t			dig_setup;
extern ia64_mv_dma_alloc_coherent	vtd_alloc_coherent;
extern ia64_mv_dma_free_coherent	vtd_free_coherent;
extern ia64_mv_dma_map_single_attrs	vtd_map_single_attrs;
extern ia64_mv_dma_unmap_single_attrs	vtd_unmap_single_attrs;
extern ia64_mv_dma_map_sg_attrs		vtd_map_sg_attrs;
extern ia64_mv_dma_unmap_sg_attrs	vtd_unmap_sg_attrs;
extern ia64_mv_dma_supported		iommu_dma_supported;
extern ia64_mv_dma_mapping_error	vtd_dma_mapping_error;
extern ia64_mv_dma_init			pci_iommu_alloc;

/*
@@ -22,17 +14,5 @@ extern ia64_mv_dma_init pci_iommu_alloc;
#define platform_name				"dig_vtd"
#define platform_setup				dig_setup
#define platform_dma_init			pci_iommu_alloc
#define platform_dma_alloc_coherent		vtd_alloc_coherent
#define platform_dma_free_coherent		vtd_free_coherent
#define platform_dma_map_single_attrs		vtd_map_single_attrs
#define platform_dma_unmap_single_attrs		vtd_unmap_single_attrs
#define platform_dma_map_sg_attrs		vtd_map_sg_attrs
#define platform_dma_unmap_sg_attrs		vtd_unmap_sg_attrs
#define platform_dma_sync_single_for_cpu	machvec_dma_sync_single
#define platform_dma_sync_sg_for_cpu		machvec_dma_sync_sg
#define platform_dma_sync_single_for_device	machvec_dma_sync_single
#define platform_dma_sync_sg_for_device		machvec_dma_sync_sg
#define platform_dma_supported			iommu_dma_supported
#define platform_dma_mapping_error		vtd_dma_mapping_error

#endif /* _ASM_IA64_MACHVEC_DIG_VTD_h */
+0 −20
Original line number Diff line number Diff line
@@ -3,14 +3,6 @@

extern ia64_mv_setup_t			dig_setup;
extern ia64_mv_dma_init			sba_dma_init;
extern ia64_mv_dma_alloc_coherent	sba_alloc_coherent;
extern ia64_mv_dma_free_coherent	sba_free_coherent;
extern ia64_mv_dma_map_single_attrs	sba_map_single_attrs;
extern ia64_mv_dma_unmap_single_attrs	sba_unmap_single_attrs;
extern ia64_mv_dma_map_sg_attrs		sba_map_sg_attrs;
extern ia64_mv_dma_unmap_sg_attrs	sba_unmap_sg_attrs;
extern ia64_mv_dma_supported		sba_dma_supported;
extern ia64_mv_dma_mapping_error	sba_dma_mapping_error;

/*
 * This stuff has dual use!
@@ -22,17 +14,5 @@ extern ia64_mv_dma_mapping_error sba_dma_mapping_error;
#define platform_name				"hpzx1"
#define platform_setup				dig_setup
#define platform_dma_init			sba_dma_init
#define platform_dma_alloc_coherent		sba_alloc_coherent
#define platform_dma_free_coherent		sba_free_coherent
#define platform_dma_map_single_attrs		sba_map_single_attrs
#define platform_dma_unmap_single_attrs		sba_unmap_single_attrs
#define platform_dma_map_sg_attrs		sba_map_sg_attrs
#define platform_dma_unmap_sg_attrs		sba_unmap_sg_attrs
#define platform_dma_sync_single_for_cpu	machvec_dma_sync_single
#define platform_dma_sync_sg_for_cpu		machvec_dma_sync_sg
#define platform_dma_sync_single_for_device	machvec_dma_sync_single
#define platform_dma_sync_sg_for_device		machvec_dma_sync_sg
#define platform_dma_supported			sba_dma_supported
#define platform_dma_mapping_error		sba_dma_mapping_error

#endif /* _ASM_IA64_MACHVEC_HPZX1_h */
+0 −25
Original line number Diff line number Diff line
@@ -2,18 +2,6 @@
#define _ASM_IA64_MACHVEC_HPZX1_SWIOTLB_h

extern ia64_mv_setup_t				dig_setup;
extern ia64_mv_dma_alloc_coherent		hwsw_alloc_coherent;
extern ia64_mv_dma_free_coherent		hwsw_free_coherent;
extern ia64_mv_dma_map_single_attrs		hwsw_map_single_attrs;
extern ia64_mv_dma_unmap_single_attrs		hwsw_unmap_single_attrs;
extern ia64_mv_dma_map_sg_attrs			hwsw_map_sg_attrs;
extern ia64_mv_dma_unmap_sg_attrs		hwsw_unmap_sg_attrs;
extern ia64_mv_dma_supported			hwsw_dma_supported;
extern ia64_mv_dma_mapping_error		hwsw_dma_mapping_error;
extern ia64_mv_dma_sync_single_for_cpu		hwsw_sync_single_for_cpu;
extern ia64_mv_dma_sync_sg_for_cpu		hwsw_sync_sg_for_cpu;
extern ia64_mv_dma_sync_single_for_device	hwsw_sync_single_for_device;
extern ia64_mv_dma_sync_sg_for_device		hwsw_sync_sg_for_device;

/*
 * This stuff has dual use!
@@ -23,20 +11,7 @@ extern ia64_mv_dma_sync_sg_for_device hwsw_sync_sg_for_device;
 * the macros are used directly.
 */
#define platform_name				"hpzx1_swiotlb"

#define platform_setup				dig_setup
#define platform_dma_init			machvec_noop
#define platform_dma_alloc_coherent		hwsw_alloc_coherent
#define platform_dma_free_coherent		hwsw_free_coherent
#define platform_dma_map_single_attrs		hwsw_map_single_attrs
#define platform_dma_unmap_single_attrs		hwsw_unmap_single_attrs
#define platform_dma_map_sg_attrs		hwsw_map_sg_attrs
#define platform_dma_unmap_sg_attrs		hwsw_unmap_sg_attrs
#define platform_dma_supported			hwsw_dma_supported
#define platform_dma_mapping_error		hwsw_dma_mapping_error
#define platform_dma_sync_single_for_cpu	hwsw_sync_single_for_cpu
#define platform_dma_sync_sg_for_cpu		hwsw_sync_sg_for_cpu
#define platform_dma_sync_single_for_device	hwsw_sync_single_for_device
#define platform_dma_sync_sg_for_device		hwsw_sync_sg_for_device

#endif /* _ASM_IA64_MACHVEC_HPZX1_SWIOTLB_h */
Loading