Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

FUJITA Tomonori and committed by
Ingo Molnar
fad6a029 b7ea6e95

+12 -186
+12 -8
arch/ia64/hp/common/hwsw_iommu.c
··· 22 22 23 23 /* hwiommu declarations & definitions: */ 24 24 25 - extern ia64_mv_dma_alloc_coherent sba_alloc_coherent; 26 - extern ia64_mv_dma_free_coherent sba_free_coherent; 27 - extern ia64_mv_dma_map_single_attrs sba_map_single_attrs; 28 - extern ia64_mv_dma_unmap_single_attrs sba_unmap_single_attrs; 29 - extern ia64_mv_dma_map_sg_attrs sba_map_sg_attrs; 30 - extern ia64_mv_dma_unmap_sg_attrs sba_unmap_sg_attrs; 31 - extern ia64_mv_dma_supported sba_dma_supported; 32 - extern ia64_mv_dma_mapping_error sba_dma_mapping_error; 25 + extern void *sba_alloc_coherent(struct device *, size_t, dma_addr_t *, gfp_t); 26 + extern void sba_free_coherent (struct device *, size_t, void *, dma_addr_t); 27 + extern dma_addr_t sba_map_single_attrs(struct device *, void *, size_t, int, 28 + struct dma_attrs *); 29 + extern void sba_unmap_single_attrs(struct device *, dma_addr_t, size_t, int, 30 + struct dma_attrs *); 31 + extern int sba_map_sg_attrs(struct device *, struct scatterlist *, int, int, 32 + struct dma_attrs *); 33 + extern void sba_unmap_sg_attrs(struct device *, struct scatterlist *, int, int, 34 + struct dma_attrs *); 35 + extern int sba_dma_supported (struct device *, u64); 36 + extern int sba_dma_mapping_error(struct device *, dma_addr_t); 33 37 34 38 #define hwiommu_alloc_coherent sba_alloc_coherent 35 39 #define hwiommu_free_coherent sba_free_coherent
-89
arch/ia64/include/asm/machvec.h
··· 45 45 46 46 /* DMA-mapping interface: */ 47 47 typedef void ia64_mv_dma_init (void); 48 - typedef void *ia64_mv_dma_alloc_coherent (struct device *, size_t, dma_addr_t *, gfp_t); 49 - typedef void ia64_mv_dma_free_coherent (struct device *, size_t, void *, dma_addr_t); 50 - typedef dma_addr_t ia64_mv_dma_map_single (struct device *, void *, size_t, int); 51 - typedef void ia64_mv_dma_unmap_single (struct device *, dma_addr_t, size_t, int); 52 - typedef int ia64_mv_dma_map_sg (struct device *, struct scatterlist *, int, int); 53 - typedef void ia64_mv_dma_unmap_sg (struct device *, struct scatterlist *, int, int); 54 - typedef void ia64_mv_dma_sync_single_for_cpu (struct device *, dma_addr_t, size_t, int); 55 - typedef void ia64_mv_dma_sync_sg_for_cpu (struct device *, struct scatterlist *, int, int); 56 - typedef void ia64_mv_dma_sync_single_for_device (struct device *, dma_addr_t, size_t, int); 57 - typedef void ia64_mv_dma_sync_sg_for_device (struct device *, struct scatterlist *, int, int); 58 - typedef int ia64_mv_dma_mapping_error(struct device *, dma_addr_t dma_addr); 59 - typedef int ia64_mv_dma_supported (struct device *, u64); 60 - 61 - typedef dma_addr_t ia64_mv_dma_map_single_attrs (struct device *, void *, size_t, int, struct dma_attrs *); 62 - typedef void ia64_mv_dma_unmap_single_attrs (struct device *, dma_addr_t, size_t, int, struct dma_attrs *); 63 - typedef int ia64_mv_dma_map_sg_attrs (struct device *, struct scatterlist *, int, int, struct dma_attrs *); 64 - typedef void ia64_mv_dma_unmap_sg_attrs (struct device *, struct scatterlist *, int, int, struct dma_attrs *); 65 48 66 49 /* 67 50 * WARNING: The legacy I/O space is _architected_. Platforms are ··· 130 147 # define platform_global_tlb_purge ia64_mv.global_tlb_purge 131 148 # define platform_tlb_migrate_finish ia64_mv.tlb_migrate_finish 132 149 # define platform_dma_init ia64_mv.dma_init 133 - # define platform_dma_alloc_coherent ia64_mv.dma_alloc_coherent 134 - # define platform_dma_free_coherent ia64_mv.dma_free_coherent 135 - # define platform_dma_map_single_attrs ia64_mv.dma_map_single_attrs 136 - # define platform_dma_unmap_single_attrs ia64_mv.dma_unmap_single_attrs 137 - # define platform_dma_map_sg_attrs ia64_mv.dma_map_sg_attrs 138 - # define platform_dma_unmap_sg_attrs ia64_mv.dma_unmap_sg_attrs 139 - # define platform_dma_sync_single_for_cpu ia64_mv.dma_sync_single_for_cpu 140 - # define platform_dma_sync_sg_for_cpu ia64_mv.dma_sync_sg_for_cpu 141 - # define platform_dma_sync_single_for_device ia64_mv.dma_sync_single_for_device 142 - # define platform_dma_sync_sg_for_device ia64_mv.dma_sync_sg_for_device 143 - # define platform_dma_mapping_error ia64_mv.dma_mapping_error 144 - # define platform_dma_supported ia64_mv.dma_supported 145 150 # define platform_irq_to_vector ia64_mv.irq_to_vector 146 151 # define platform_local_vector_to_irq ia64_mv.local_vector_to_irq 147 152 # define platform_pci_get_legacy_mem ia64_mv.pci_get_legacy_mem ··· 172 201 ia64_mv_global_tlb_purge_t *global_tlb_purge; 173 202 ia64_mv_tlb_migrate_finish_t *tlb_migrate_finish; 174 203 ia64_mv_dma_init *dma_init; 175 - ia64_mv_dma_alloc_coherent *dma_alloc_coherent; 176 - ia64_mv_dma_free_coherent *dma_free_coherent; 177 - ia64_mv_dma_map_single_attrs *dma_map_single_attrs; 178 - ia64_mv_dma_unmap_single_attrs *dma_unmap_single_attrs; 179 - ia64_mv_dma_map_sg_attrs *dma_map_sg_attrs; 180 - ia64_mv_dma_unmap_sg_attrs *dma_unmap_sg_attrs; 181 - ia64_mv_dma_sync_single_for_cpu *dma_sync_single_for_cpu; 182 - ia64_mv_dma_sync_sg_for_cpu *dma_sync_sg_for_cpu; 183 - ia64_mv_dma_sync_single_for_device *dma_sync_single_for_device; 184 - ia64_mv_dma_sync_sg_for_device *dma_sync_sg_for_device; 185 - ia64_mv_dma_mapping_error *dma_mapping_error; 186 - ia64_mv_dma_supported *dma_supported; 187 204 ia64_mv_irq_to_vector *irq_to_vector; 188 205 ia64_mv_local_vector_to_irq *local_vector_to_irq; 189 206 ia64_mv_pci_get_legacy_mem_t *pci_get_legacy_mem; ··· 210 251 platform_global_tlb_purge, \ 211 252 platform_tlb_migrate_finish, \ 212 253 platform_dma_init, \ 213 - platform_dma_alloc_coherent, \ 214 - platform_dma_free_coherent, \ 215 - platform_dma_map_single_attrs, \ 216 - platform_dma_unmap_single_attrs, \ 217 - platform_dma_map_sg_attrs, \ 218 - platform_dma_unmap_sg_attrs, \ 219 - platform_dma_sync_single_for_cpu, \ 220 - platform_dma_sync_sg_for_cpu, \ 221 - platform_dma_sync_single_for_device, \ 222 - platform_dma_sync_sg_for_device, \ 223 - platform_dma_mapping_error, \ 224 - platform_dma_supported, \ 225 254 platform_irq_to_vector, \ 226 255 platform_local_vector_to_irq, \ 227 256 platform_pci_get_legacy_mem, \ ··· 278 331 #endif 279 332 #ifndef platform_dma_init 280 333 # define platform_dma_init swiotlb_dma_init 281 - #endif 282 - #ifndef platform_dma_alloc_coherent 283 - # define platform_dma_alloc_coherent swiotlb_alloc_coherent 284 - #endif 285 - #ifndef platform_dma_free_coherent 286 - # define platform_dma_free_coherent swiotlb_free_coherent 287 - #endif 288 - #ifndef platform_dma_map_single_attrs 289 - # define platform_dma_map_single_attrs swiotlb_map_single_attrs 290 - #endif 291 - #ifndef platform_dma_unmap_single_attrs 292 - # define platform_dma_unmap_single_attrs swiotlb_unmap_single_attrs 293 - #endif 294 - #ifndef platform_dma_map_sg_attrs 295 - # define platform_dma_map_sg_attrs swiotlb_map_sg_attrs 296 - #endif 297 - #ifndef platform_dma_unmap_sg_attrs 298 - # define platform_dma_unmap_sg_attrs swiotlb_unmap_sg_attrs 299 - #endif 300 - #ifndef platform_dma_sync_single_for_cpu 301 - # define platform_dma_sync_single_for_cpu swiotlb_sync_single_for_cpu 302 - #endif 303 - #ifndef platform_dma_sync_sg_for_cpu 304 - # define platform_dma_sync_sg_for_cpu swiotlb_sync_sg_for_cpu 305 - #endif 306 - #ifndef platform_dma_sync_single_for_device 307 - # define platform_dma_sync_single_for_device swiotlb_sync_single_for_device 308 - #endif 309 - #ifndef platform_dma_sync_sg_for_device 310 - # define platform_dma_sync_sg_for_device swiotlb_sync_sg_for_device 311 - #endif 312 - #ifndef platform_dma_mapping_error 313 - # define platform_dma_mapping_error swiotlb_dma_mapping_error 314 - #endif 315 - #ifndef platform_dma_supported 316 - # define platform_dma_supported swiotlb_dma_supported 317 334 #endif 318 335 #ifndef platform_irq_to_vector 319 336 # define platform_irq_to_vector __ia64_irq_to_vector
-20
arch/ia64/include/asm/machvec_dig_vtd.h
··· 2 2 #define _ASM_IA64_MACHVEC_DIG_VTD_h 3 3 4 4 extern ia64_mv_setup_t dig_setup; 5 - extern ia64_mv_dma_alloc_coherent vtd_alloc_coherent; 6 - extern ia64_mv_dma_free_coherent vtd_free_coherent; 7 - extern ia64_mv_dma_map_single_attrs vtd_map_single_attrs; 8 - extern ia64_mv_dma_unmap_single_attrs vtd_unmap_single_attrs; 9 - extern ia64_mv_dma_map_sg_attrs vtd_map_sg_attrs; 10 - extern ia64_mv_dma_unmap_sg_attrs vtd_unmap_sg_attrs; 11 - extern ia64_mv_dma_supported iommu_dma_supported; 12 - extern ia64_mv_dma_mapping_error vtd_dma_mapping_error; 13 5 extern ia64_mv_dma_init pci_iommu_alloc; 14 6 15 7 /* ··· 14 22 #define platform_name "dig_vtd" 15 23 #define platform_setup dig_setup 16 24 #define platform_dma_init pci_iommu_alloc 17 - #define platform_dma_alloc_coherent vtd_alloc_coherent 18 - #define platform_dma_free_coherent vtd_free_coherent 19 - #define platform_dma_map_single_attrs vtd_map_single_attrs 20 - #define platform_dma_unmap_single_attrs vtd_unmap_single_attrs 21 - #define platform_dma_map_sg_attrs vtd_map_sg_attrs 22 - #define platform_dma_unmap_sg_attrs vtd_unmap_sg_attrs 23 - #define platform_dma_sync_single_for_cpu machvec_dma_sync_single 24 - #define platform_dma_sync_sg_for_cpu machvec_dma_sync_sg 25 - #define platform_dma_sync_single_for_device machvec_dma_sync_single 26 - #define platform_dma_sync_sg_for_device machvec_dma_sync_sg 27 - #define platform_dma_supported iommu_dma_supported 28 - #define platform_dma_mapping_error vtd_dma_mapping_error 29 25 30 26 #endif /* _ASM_IA64_MACHVEC_DIG_VTD_h */
-20
arch/ia64/include/asm/machvec_hpzx1.h
··· 3 3 4 4 extern ia64_mv_setup_t dig_setup; 5 5 extern ia64_mv_dma_init sba_dma_init; 6 - extern ia64_mv_dma_alloc_coherent sba_alloc_coherent; 7 - extern ia64_mv_dma_free_coherent sba_free_coherent; 8 - extern ia64_mv_dma_map_single_attrs sba_map_single_attrs; 9 - extern ia64_mv_dma_unmap_single_attrs sba_unmap_single_attrs; 10 - extern ia64_mv_dma_map_sg_attrs sba_map_sg_attrs; 11 - extern ia64_mv_dma_unmap_sg_attrs sba_unmap_sg_attrs; 12 - extern ia64_mv_dma_supported sba_dma_supported; 13 - extern ia64_mv_dma_mapping_error sba_dma_mapping_error; 14 6 15 7 /* 16 8 * This stuff has dual use! ··· 14 22 #define platform_name "hpzx1" 15 23 #define platform_setup dig_setup 16 24 #define platform_dma_init sba_dma_init 17 - #define platform_dma_alloc_coherent sba_alloc_coherent 18 - #define platform_dma_free_coherent sba_free_coherent 19 - #define platform_dma_map_single_attrs sba_map_single_attrs 20 - #define platform_dma_unmap_single_attrs sba_unmap_single_attrs 21 - #define platform_dma_map_sg_attrs sba_map_sg_attrs 22 - #define platform_dma_unmap_sg_attrs sba_unmap_sg_attrs 23 - #define platform_dma_sync_single_for_cpu machvec_dma_sync_single 24 - #define platform_dma_sync_sg_for_cpu machvec_dma_sync_sg 25 - #define platform_dma_sync_single_for_device machvec_dma_sync_single 26 - #define platform_dma_sync_sg_for_device machvec_dma_sync_sg 27 - #define platform_dma_supported sba_dma_supported 28 - #define platform_dma_mapping_error sba_dma_mapping_error 29 25 30 26 #endif /* _ASM_IA64_MACHVEC_HPZX1_h */
-25
arch/ia64/include/asm/machvec_hpzx1_swiotlb.h
··· 2 2 #define _ASM_IA64_MACHVEC_HPZX1_SWIOTLB_h 3 3 4 4 extern ia64_mv_setup_t dig_setup; 5 - extern ia64_mv_dma_alloc_coherent hwsw_alloc_coherent; 6 - extern ia64_mv_dma_free_coherent hwsw_free_coherent; 7 - extern ia64_mv_dma_map_single_attrs hwsw_map_single_attrs; 8 - extern ia64_mv_dma_unmap_single_attrs hwsw_unmap_single_attrs; 9 - extern ia64_mv_dma_map_sg_attrs hwsw_map_sg_attrs; 10 - extern ia64_mv_dma_unmap_sg_attrs hwsw_unmap_sg_attrs; 11 - extern ia64_mv_dma_supported hwsw_dma_supported; 12 - extern ia64_mv_dma_mapping_error hwsw_dma_mapping_error; 13 - extern ia64_mv_dma_sync_single_for_cpu hwsw_sync_single_for_cpu; 14 - extern ia64_mv_dma_sync_sg_for_cpu hwsw_sync_sg_for_cpu; 15 - extern ia64_mv_dma_sync_single_for_device hwsw_sync_single_for_device; 16 - extern ia64_mv_dma_sync_sg_for_device hwsw_sync_sg_for_device; 17 5 18 6 /* 19 7 * This stuff has dual use! ··· 11 23 * the macros are used directly. 12 24 */ 13 25 #define platform_name "hpzx1_swiotlb" 14 - 15 26 #define platform_setup dig_setup 16 27 #define platform_dma_init machvec_noop 17 - #define platform_dma_alloc_coherent hwsw_alloc_coherent 18 - #define platform_dma_free_coherent hwsw_free_coherent 19 - #define platform_dma_map_single_attrs hwsw_map_single_attrs 20 - #define platform_dma_unmap_single_attrs hwsw_unmap_single_attrs 21 - #define platform_dma_map_sg_attrs hwsw_map_sg_attrs 22 - #define platform_dma_unmap_sg_attrs hwsw_unmap_sg_attrs 23 - #define platform_dma_supported hwsw_dma_supported 24 - #define platform_dma_mapping_error hwsw_dma_mapping_error 25 - #define platform_dma_sync_single_for_cpu hwsw_sync_single_for_cpu 26 - #define platform_dma_sync_sg_for_cpu hwsw_sync_sg_for_cpu 27 - #define platform_dma_sync_single_for_device hwsw_sync_single_for_device 28 - #define platform_dma_sync_sg_for_device hwsw_sync_sg_for_device 29 28 30 29 #endif /* _ASM_IA64_MACHVEC_HPZX1_SWIOTLB_h */
-24
arch/ia64/include/asm/machvec_sn2.h
··· 56 56 extern ia64_mv_readl_t __sn_readl_relaxed; 57 57 extern ia64_mv_readq_t __sn_readq_relaxed; 58 58 extern ia64_mv_dma_init sn_dma_init; 59 - extern ia64_mv_dma_alloc_coherent sn_dma_alloc_coherent; 60 - extern ia64_mv_dma_free_coherent sn_dma_free_coherent; 61 - extern ia64_mv_dma_map_single_attrs sn_dma_map_single_attrs; 62 - extern ia64_mv_dma_unmap_single_attrs sn_dma_unmap_single_attrs; 63 - extern ia64_mv_dma_map_sg_attrs sn_dma_map_sg_attrs; 64 - extern ia64_mv_dma_unmap_sg_attrs sn_dma_unmap_sg_attrs; 65 - extern ia64_mv_dma_sync_single_for_cpu sn_dma_sync_single_for_cpu; 66 - extern ia64_mv_dma_sync_sg_for_cpu sn_dma_sync_sg_for_cpu; 67 - extern ia64_mv_dma_sync_single_for_device sn_dma_sync_single_for_device; 68 - extern ia64_mv_dma_sync_sg_for_device sn_dma_sync_sg_for_device; 69 - extern ia64_mv_dma_mapping_error sn_dma_mapping_error; 70 - extern ia64_mv_dma_supported sn_dma_supported; 71 59 extern ia64_mv_migrate_t sn_migrate; 72 60 extern ia64_mv_kernel_launch_event_t sn_kernel_launch_event; 73 61 extern ia64_mv_setup_msi_irq_t sn_setup_msi_irq; ··· 100 112 #define platform_pci_legacy_read sn_pci_legacy_read 101 113 #define platform_pci_legacy_write sn_pci_legacy_write 102 114 #define platform_dma_init sn_dma_init 103 - #define platform_dma_alloc_coherent sn_dma_alloc_coherent 104 - #define platform_dma_free_coherent sn_dma_free_coherent 105 - #define platform_dma_map_single_attrs sn_dma_map_single_attrs 106 - #define platform_dma_unmap_single_attrs sn_dma_unmap_single_attrs 107 - #define platform_dma_map_sg_attrs sn_dma_map_sg_attrs 108 - #define platform_dma_unmap_sg_attrs sn_dma_unmap_sg_attrs 109 - #define platform_dma_sync_single_for_cpu sn_dma_sync_single_for_cpu 110 - #define platform_dma_sync_sg_for_cpu sn_dma_sync_sg_for_cpu 111 - #define platform_dma_sync_single_for_device sn_dma_sync_single_for_device 112 - #define platform_dma_sync_sg_for_device sn_dma_sync_sg_for_device 113 - #define platform_dma_mapping_error sn_dma_mapping_error 114 - #define platform_dma_supported sn_dma_supported 115 115 #define platform_migrate sn_migrate 116 116 #define platform_kernel_launch_event sn_kernel_launch_event 117 117 #ifdef CONFIG_PCI_MSI