*参照元 [#zb7d666b]
#backlinks

*説明 [#udb98bb4]
-パス: [[linux-4.4.1/include/linux/dma-mapping.h]]

-FIXME: これは何?
--説明


**参考 [#z67612a7]

-ざっくり検索した結果とそのリンク。
--arch/sh/kernel/dma-nommu.c: [[linux-4.4.1/nommu_dma_ops(global)]]
--arch/arm/mm/dma-mapping.c: [[linux-4.4.1/arm_dma_ops(global)]]
--arch/arm/mm/dma-mapping.c: [[linux-4.4.1/arm_coherent_dma_ops(global)]]
--arch/arm/mm/dma-mapping.c: [[linux-4.4.1/iommu_ops(global)]]
--arch/arm/mm/dma-mapping.c: [[linux-4.4.1/iommu_coherent_ops(global)]]
--arch/arm/xen/mm.c: [[linux-4.4.1/xen_swiotlb_dma_ops(global)]]
--arch/arm/common/dmabounce.c: [[linux-4.4.1/dmabounce_ops(global)]]
--arch/x86/pci/sta2x11-fixup.c: [[linux-4.4.1/sta2x11_dma_ops(global)]]
--arch/x86/xen/pci-swiotlb-xen.c: [[linux-4.4.1/xen_swiotlb_dma_ops(global)]]
--arch/x86/kernel/pci-calgary_64.c: [[linux-4.4.1/calgary_dma_ops(global)]]
--arch/x86/kernel/amd_gart_64.c: [[linux-4.4.1/gart_dma_ops(global)]]
--arch/x86/kernel/pci-nommu.c: [[linux-4.4.1/nommu_dma_ops(global)]]
--arch/x86/kernel/pci-swiotlb.c: [[linux-4.4.1/swiotlb_dma_ops(global)]]
--arch/ia64/hp/common/sba_iommu.c: [[linux-4.4.1/sba_dma_ops(global)]]
--arch/ia64/sn/pci/pci_dma.c: [[linux-4.4.1/sn_dma_ops(global)]]
--arch/ia64/kernel/pci-swiotlb.c: [[linux-4.4.1/swiotlb_dma_ops(global)]]
--arch/mips/mm/dma-default.c: [[linux-4.4.1/mips_default_dma_map_ops(global)]]
--arch/mips/loongson64/common/dma-swiotlb.c: [[linux-4.4.1/loongson_dma_map_ops(global)]]
--arch/mips/netlogic/common/nlm-dma.c: [[linux-4.4.1/nlm_swiotlb_dma_ops(global)]]
--arch/s390/pci/pci_dma.c: [[linux-4.4.1/s390_dma_ops(global)]]
--arch/tile/kernel/pci-dma.c: [[linux-4.4.1/tile_default_dma_map_ops(global)]]
--arch/tile/kernel/pci-dma.c: [[linux-4.4.1/tile_pci_default_dma_map_ops(global)]]
--arch/tile/kernel/pci-dma.c: [[linux-4.4.1/pci_swiotlb_dma_ops(global)]]
--arch/tile/kernel/pci-dma.c: [[linux-4.4.1/pci_hybrid_dma_ops(global)]]
--arch/alpha/kernel/pci_iommu.c: [[linux-4.4.1/alpha_pci_ops(global)]]
--arch/alpha/kernel/pci-noop.c: [[linux-4.4.1/alpha_noop_ops(global)]]
--arch/arm64/mm/dma-mapping.c: [[linux-4.4.1/swiotlb_dma_ops(global)]]
--arch/arm64/mm/dma-mapping.c: [[linux-4.4.1/dummy_dma_ops(global)]]
--arch/arm64/mm/dma-mapping.c: [[linux-4.4.1/iommu_dma_ops(global)]]
--arch/h8300/kernel/dma.c: [[linux-4.4.1/h8300_dma_map_ops(global)]]
--arch/sparc/kernel/ioport.c: [[linux-4.4.1/sbus_dma_ops(global)]]
--arch/sparc/kernel/ioport.c: [[linux-4.4.1/pci32_dma_ops(global)]]
--arch/sparc/kernel/pci_sun4v.c: [[linux-4.4.1/sun4v_dma_ops(global)]]
--arch/sparc/kernel/iommu.c: [[linux-4.4.1/sun4u_dma_ops(global)]]
--arch/unicore32/mm/dma-swiotlb.c: [[linux-4.4.1/swiotlb_dma_map_ops(global)]]
--arch/hexagon/kernel/dma.c: [[linux-4.4.1/hexagon_dma_ops(global)]]
--arch/openrisc/kernel/dma.c: [[linux-4.4.1/or1k_dma_map_ops(global)]]
--arch/xtensa/kernel/pci-dma.c: [[linux-4.4.1/xtensa_dma_map_ops(global)]]
--arch/microblaze/kernel/dma.c: [[linux-4.4.1/dma_direct_ops(global)]]
--arch/powerpc/platforms/ps3/system-bus.c: [[linux-4.4.1/ps3_sb_dma_ops(global)]]
--arch/powerpc/platforms/ps3/system-bus.c: [[linux-4.4.1/ps3_ioc0_dma_ops(global)]]
--arch/powerpc/platforms/cell/iommu.c: [[linux-4.4.1/dma_iommu_fixed_ops(global)]]
--arch/powerpc/kernel/dma-swiotlb.c: [[linux-4.4.1/swiotlb_dma_ops(global)]]
--arch/powerpc/kernel/dma.c: [[linux-4.4.1/dma_direct_ops(global)]]
--arch/powerpc/kernel/vio.c: [[linux-4.4.1/vio_dma_mapping_ops(global)]]
--arch/powerpc/kernel/dma-iommu.c: [[linux-4.4.1/dma_iommu_ops(global)]]
--arch/powerpc/kernel/ibmebus.c: [[linux-4.4.1/ibmebus_dma_ops(global)]]
--drivers/misc/mic/host/mic_boot.c: [[linux-4.4.1/__mic_dma_ops(global)]]
--drivers/misc/mic/host/mic_boot.c: [[linux-4.4.1/mic_dma_ops(global)]]
--drivers/iommu/intel-iommu.c: [[linux-4.4.1/intel_dma_ops(global)]]
--drivers/iommu/amd_iommu.c: [[linux-4.4.1/amd_iommu_dma_ops(global)]]
--[[linux-4.4.1/nommu_dma_ops(global)]]: arch/sh/kernel/dma-nommu.c
--[[linux-4.4.1/arm_dma_ops(global)]]: arch/arm/mm/dma-mapping.c
--[[linux-4.4.1/arm_coherent_dma_ops(global)]]: arch/arm/mm/dma-mapping.c
--[[linux-4.4.1/iommu_ops(global)]]: arch/arm/mm/dma-mapping.c
--[[linux-4.4.1/iommu_coherent_ops(global)]]: arch/arm/mm/dma-mapping.c
--[[linux-4.4.1/xen_swiotlb_dma_ops(global)]]: arch/arm/xen/mm.c
--[[linux-4.4.1/dmabounce_ops(global)]]: arch/arm/common/dmabounce.c
--[[linux-4.4.1/sta2x11_dma_ops(global)]]: arch/x86/pci/sta2x11-fixup.c
--[[linux-4.4.1/xen_swiotlb_dma_ops(global)]]: arch/x86/xen/pci-swiotlb-xen.c
--[[linux-4.4.1/calgary_dma_ops(global)]]: arch/x86/kernel/pci-calgary_64.c
--[[linux-4.4.1/gart_dma_ops(global)]]: arch/x86/kernel/amd_gart_64.c
--[[linux-4.4.1/nommu_dma_ops(global)]]: arch/x86/kernel/pci-nommu.c
--[[linux-4.4.1/swiotlb_dma_ops(global)]]: arch/x86/kernel/pci-swiotlb.c
--[[linux-4.4.1/sba_dma_ops(global)]]: arch/ia64/hp/common/sba_iommu.c
--[[linux-4.4.1/sn_dma_ops(global)]]: arch/ia64/sn/pci/pci_dma.c
--[[linux-4.4.1/swiotlb_dma_ops(global)]]: arch/ia64/kernel/pci-swiotlb.c
--[[linux-4.4.1/mips_default_dma_map_ops(global)]]: arch/mips/mm/dma-default.c
--[[linux-4.4.1/loongson_dma_map_ops(global)]]: arch/mips/loongson64/common/dma-swiotlb.c
--[[linux-4.4.1/nlm_swiotlb_dma_ops(global)]]: arch/mips/netlogic/common/nlm-dma.c
--[[linux-4.4.1/s390_dma_ops(global)]]: arch/s390/pci/pci_dma.c
--[[linux-4.4.1/tile_default_dma_map_ops(global)]]: arch/tile/kernel/pci-dma.c
--[[linux-4.4.1/tile_pci_default_dma_map_ops(global)]]: arch/tile/kernel/pci-dma.c
--[[linux-4.4.1/pci_swiotlb_dma_ops(global)]]: arch/tile/kernel/pci-dma.c
--[[linux-4.4.1/pci_hybrid_dma_ops(global)]]: arch/tile/kernel/pci-dma.c
--[[linux-4.4.1/alpha_pci_ops(global)]]: arch/alpha/kernel/pci_iommu.c
--[[linux-4.4.1/alpha_noop_ops(global)]]: arch/alpha/kernel/pci-noop.c
--[[linux-4.4.1/swiotlb_dma_ops(global)]]: arch/arm64/mm/dma-mapping.c
--[[linux-4.4.1/dummy_dma_ops(global)]]: arch/arm64/mm/dma-mapping.c
--[[linux-4.4.1/iommu_dma_ops(global)]]: arch/arm64/mm/dma-mapping.c
--[[linux-4.4.1/h8300_dma_map_ops(global)]]: arch/h8300/kernel/dma.c
--[[linux-4.4.1/sbus_dma_ops(global)]]: arch/sparc/kernel/ioport.c
--[[linux-4.4.1/pci32_dma_ops(global)]]: arch/sparc/kernel/ioport.c
--[[linux-4.4.1/sun4v_dma_ops(global)]]: arch/sparc/kernel/pci_sun4v.c
--[[linux-4.4.1/sun4u_dma_ops(global)]]: arch/sparc/kernel/iommu.c
--[[linux-4.4.1/swiotlb_dma_map_ops(global)]]: arch/unicore32/mm/dma-swiotlb.c
--[[linux-4.4.1/hexagon_dma_ops(global)]]: arch/hexagon/kernel/dma.c
--[[linux-4.4.1/or1k_dma_map_ops(global)]]: arch/openrisc/kernel/dma.c
--[[linux-4.4.1/xtensa_dma_map_ops(global)]]: arch/xtensa/kernel/pci-dma.c
--[[linux-4.4.1/dma_direct_ops(global)]]: arch/microblaze/kernel/dma.c
--[[linux-4.4.1/ps3_sb_dma_ops(global)]]: arch/powerpc/platforms/ps3/system-bus.c
--[[linux-4.4.1/ps3_ioc0_dma_ops(global)]]: arch/powerpc/platforms/ps3/system-bus.c
--[[linux-4.4.1/dma_iommu_fixed_ops(global)]]: arch/powerpc/platforms/cell/iommu.c
--[[linux-4.4.1/swiotlb_dma_ops(global)]]: arch/powerpc/kernel/dma-swiotlb.c
--[[linux-4.4.1/dma_direct_ops(global)]]: arch/powerpc/kernel/dma.c
--[[linux-4.4.1/vio_dma_mapping_ops(global)]]: arch/powerpc/kernel/vio.c
--[[linux-4.4.1/dma_iommu_ops(global)]]: arch/powerpc/kernel/dma-iommu.c
--[[linux-4.4.1/ibmebus_dma_ops(global)]]: arch/powerpc/kernel/ibmebus.c
--[[linux-4.4.1/__mic_dma_ops(global)]]: drivers/misc/mic/host/mic_boot.c
--[[linux-4.4.1/mic_dma_ops(global)]]: drivers/misc/mic/host/mic_boot.c
--[[linux-4.4.1/intel_dma_ops(global)]]: drivers/iommu/intel-iommu.c
--[[linux-4.4.1/amd_iommu_dma_ops(global)]]: drivers/iommu/amd_iommu.c


 $ 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 = {


*実装 [#z39a6233]
 /*
  * 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);
-
--[[linux-4.4.1/device]]
--[[linux-4.4.1/dma_addr_t]]
--[[linux-4.4.1/gfp_t]]
--[[linux-4.4.1/dma_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);
 
-
--[[linux-4.4.1/vm_area_struct]]

         int (*get_sgtable)(struct device *dev, struct sg_table *sgt, void *,
                            dma_addr_t, size_t, struct dma_attrs *attrs);
 
-
--[[linux-4.4.1/sg_table]]

         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);
-
--[[linux-4.4.1/page]]
--[[linux-4.4.1/dma_data_direction]]

         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);
-
--[[linux-4.4.1/scatterlist]]

         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
-
--[[linux-4.4.1/ARCH_HAS_DMA_GET_REQUIRED_MASK]]

         u64 (*get_required_mask)(struct device *dev);
 #endif
         int is_phys;
 };


*コメント [#r12500ed]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS