@@ -509,39 +509,9 @@ EXPORT_SYMBOL(gx_pci_dma_map_ops);
509
509
/* PCI DMA mapping functions for legacy PCI devices */
510
510
511
511
#ifdef CONFIG_SWIOTLB
512
- static void * tile_swiotlb_alloc_coherent (struct device * dev , size_t size ,
513
- dma_addr_t * dma_handle , gfp_t gfp ,
514
- unsigned long attrs )
515
- {
516
- gfp |= GFP_DMA32 ;
517
- return swiotlb_alloc_coherent (dev , size , dma_handle , gfp );
518
- }
519
-
520
- static void tile_swiotlb_free_coherent (struct device * dev , size_t size ,
521
- void * vaddr , dma_addr_t dma_addr ,
522
- unsigned long attrs )
523
- {
524
- swiotlb_free_coherent (dev , size , vaddr , dma_addr );
525
- }
526
-
527
- static const struct dma_map_ops pci_swiotlb_dma_ops = {
528
- .alloc = tile_swiotlb_alloc_coherent ,
529
- .free = tile_swiotlb_free_coherent ,
530
- .map_page = swiotlb_map_page ,
531
- .unmap_page = swiotlb_unmap_page ,
532
- .map_sg = swiotlb_map_sg_attrs ,
533
- .unmap_sg = swiotlb_unmap_sg_attrs ,
534
- .sync_single_for_cpu = swiotlb_sync_single_for_cpu ,
535
- .sync_single_for_device = swiotlb_sync_single_for_device ,
536
- .sync_sg_for_cpu = swiotlb_sync_sg_for_cpu ,
537
- .sync_sg_for_device = swiotlb_sync_sg_for_device ,
538
- .dma_supported = swiotlb_dma_supported ,
539
- .mapping_error = swiotlb_dma_mapping_error ,
540
- };
541
-
542
512
static const struct dma_map_ops pci_hybrid_dma_ops = {
543
- .alloc = tile_swiotlb_alloc_coherent ,
544
- .free = tile_swiotlb_free_coherent ,
513
+ .alloc = swiotlb_alloc ,
514
+ .free = swiotlb_free ,
545
515
.map_page = tile_pci_dma_map_page ,
546
516
.unmap_page = tile_pci_dma_unmap_page ,
547
517
.map_sg = tile_pci_dma_map_sg ,
@@ -552,7 +522,7 @@ static const struct dma_map_ops pci_hybrid_dma_ops = {
552
522
.sync_sg_for_device = tile_pci_dma_sync_sg_for_device ,
553
523
};
554
524
555
- const struct dma_map_ops * gx_legacy_pci_dma_map_ops = & pci_swiotlb_dma_ops ;
525
+ const struct dma_map_ops * gx_legacy_pci_dma_map_ops = & swiotlb_dma_ops ;
556
526
const struct dma_map_ops * gx_hybrid_pci_dma_map_ops = & pci_hybrid_dma_ops ;
557
527
#else
558
528
const struct dma_map_ops * gx_legacy_pci_dma_map_ops ;
0 commit comments