参照元†
$ grep -r 'struct dma_map_ops [^*]' | grep '='
arch/sh/kernel/dma-nommu.c:struct dma_map_ops nommu_dma_ops = {
arch/arm/mm/dma-mapping.c:struct dma_map_ops arm_dma_ops = {
arch/arm/mm/dma-mapping.c:struct dma_map_ops arm_coherent_dma_ops = {
arch/arm/mm/dma-mapping.c:struct dma_map_ops iommu_ops = {
arch/arm/mm/dma-mapping.c:struct dma_map_ops iommu_coherent_ops = {
arch/arm/xen/mm.c:static struct dma_map_ops xen_swiotlb_dma_ops = {
arch/arm/common/dmabounce.c:static struct dma_map_ops dmabounce_ops = {
arch/x86/pci/sta2x11-fixup.c:static struct dma_map_ops sta2x11_dma_ops = {
arch/x86/xen/pci-swiotlb-xen.c:static struct dma_map_ops xen_swiotlb_dma_ops = {
arch/x86/kernel/pci-calgary_64.c:static struct dma_map_ops calgary_dma_ops = {
arch/x86/kernel/amd_gart_64.c:static struct dma_map_ops gart_dma_ops = {
arch/x86/kernel/pci-nommu.c:struct dma_map_ops nommu_dma_ops = {
arch/x86/kernel/pci-swiotlb.c:static struct dma_map_ops swiotlb_dma_ops = {
arch/ia64/hp/common/sba_iommu.c:struct dma_map_ops sba_dma_ops = {
arch/ia64/sn/pci/pci_dma.c:static struct dma_map_ops sn_dma_ops = {
arch/ia64/kernel/pci-swiotlb.c:struct dma_map_ops swiotlb_dma_ops = {
arch/mips/mm/dma-default.c:static struct dma_map_ops mips_default_dma_map_ops = {
arch/mips/loongson64/common/dma-swiotlb.c:static struct dma_map_ops loongson_dma_map_ops = {
arch/mips/netlogic/common/nlm-dma.c:struct dma_map_ops nlm_swiotlb_dma_ops = {
arch/s390/pci/pci_dma.c:struct dma_map_ops s390_dma_ops = {
arch/tile/kernel/pci-dma.c:static struct dma_map_ops tile_default_dma_map_ops = {
arch/tile/kernel/pci-dma.c:static struct dma_map_ops tile_pci_default_dma_map_ops = {
arch/tile/kernel/pci-dma.c:static struct dma_map_ops pci_swiotlb_dma_ops = {
arch/tile/kernel/pci-dma.c:static struct dma_map_ops pci_hybrid_dma_ops = {
arch/alpha/kernel/pci_iommu.c:struct dma_map_ops alpha_pci_ops = {
arch/alpha/kernel/pci-noop.c:struct dma_map_ops alpha_noop_ops = {
arch/arm64/mm/dma-mapping.c:static struct dma_map_ops swiotlb_dma_ops = {
arch/arm64/mm/dma-mapping.c:struct dma_map_ops dummy_dma_ops = {
arch/arm64/mm/dma-mapping.c:static struct dma_map_ops iommu_dma_ops = {
arch/h8300/kernel/dma.c:struct dma_map_ops h8300_dma_map_ops = {
arch/sparc/kernel/ioport.c:static struct dma_map_ops sbus_dma_ops = {
arch/sparc/kernel/ioport.c:struct dma_map_ops pci32_dma_ops = {
arch/sparc/kernel/pci_sun4v.c:static struct dma_map_ops sun4v_dma_ops = {
arch/sparc/kernel/iommu.c:static struct dma_map_ops sun4u_dma_ops = {
arch/unicore32/mm/dma-swiotlb.c:struct dma_map_ops swiotlb_dma_map_ops = {
arch/hexagon/kernel/dma.c:struct dma_map_ops hexagon_dma_ops = {
arch/openrisc/kernel/dma.c:struct dma_map_ops or1k_dma_map_ops = {
arch/xtensa/kernel/pci-dma.c:struct dma_map_ops xtensa_dma_map_ops = {
arch/microblaze/kernel/dma.c:struct dma_map_ops dma_direct_ops = {
arch/powerpc/platforms/ps3/system-bus.c:static struct dma_map_ops ps3_sb_dma_ops = {
arch/powerpc/platforms/ps3/system-bus.c:static struct dma_map_ops ps3_ioc0_dma_ops = {
arch/powerpc/platforms/cell/iommu.c:struct dma_map_ops dma_iommu_fixed_ops = {
arch/powerpc/kernel/dma-swiotlb.c:struct dma_map_ops swiotlb_dma_ops = {
arch/powerpc/kernel/dma.c:struct dma_map_ops dma_direct_ops = {
arch/powerpc/kernel/vio.c:struct dma_map_ops vio_dma_mapping_ops = {
arch/powerpc/kernel/dma-iommu.c:struct dma_map_ops dma_iommu_ops = {
arch/powerpc/kernel/ibmebus.c:static struct dma_map_ops ibmebus_dma_ops = {
drivers/misc/mic/host/mic_boot.c:static struct dma_map_ops __mic_dma_ops = {
drivers/misc/mic/host/mic_boot.c:static struct dma_map_ops mic_dma_ops = {
drivers/iommu/intel-iommu.c:struct dma_map_ops intel_dma_ops = {
drivers/iommu/amd_iommu.c:static struct dma_map_ops amd_iommu_dma_ops = {
/*
* A dma_addr_t can hold any valid DMA or bus address for the platform.
* It can be given to a device to use as a DMA source or target. A CPU cannot
* reference a dma_addr_t directly because there may be translation between
* its physical address space and the bus address space.
*/
struct dma_map_ops {
void* (*alloc)(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t gfp,
struct dma_attrs *attrs);
void (*free)(struct device *dev, size_t size,
void *vaddr, dma_addr_t dma_handle,
struct dma_attrs *attrs);
int (*mmap)(struct device *, struct vm_area_struct *,
void *, dma_addr_t, size_t, struct dma_attrs *attrs);
int (*get_sgtable)(struct device *dev, struct sg_table *sgt, void *,
dma_addr_t, size_t, struct dma_attrs *attrs);
dma_addr_t (*map_page)(struct device *dev, struct page *page,
unsigned long offset, size_t size,
enum dma_data_direction dir,
struct dma_attrs *attrs);
void (*unmap_page)(struct device *dev, dma_addr_t dma_handle,
size_t size, enum dma_data_direction dir,
struct dma_attrs *attrs);
/*
* map_sg returns 0 on error and a value > 0 on success.
* It should never return a value < 0.
*/
int (*map_sg)(struct device *dev, struct scatterlist *sg,
int nents, enum dma_data_direction dir,
struct dma_attrs *attrs);
void (*unmap_sg)(struct device *dev,
struct scatterlist *sg, int nents,
enum dma_data_direction dir,
struct dma_attrs *attrs);
void (*sync_single_for_cpu)(struct device *dev,
dma_addr_t dma_handle, size_t size,
enum dma_data_direction dir);
void (*sync_single_for_device)(struct device *dev,
dma_addr_t dma_handle, size_t size,
enum dma_data_direction dir);
void (*sync_sg_for_cpu)(struct device *dev,
struct scatterlist *sg, int nents,
enum dma_data_direction dir);
void (*sync_sg_for_device)(struct device *dev,
struct scatterlist *sg, int nents,
enum dma_data_direction dir);
int (*mapping_error)(struct device *dev, dma_addr_t dma_addr);
int (*dma_supported)(struct device *dev, u64 mask);
int (*set_dma_mask)(struct device *dev, u64 mask);
#ifdef ARCH_HAS_DMA_GET_REQUIRED_MASK
u64 (*get_required_mask)(struct device *dev);
#endif
int is_phys;
};
コメント†