linux/drivers/infiniband/hw/qib
Christophe JAILLET 3f69f4e0d6 RDMA: switch from 'pci_' to 'dma_' API
The wrappers in include/linux/pci-dma-compat.h should go away.

The patch has been generated with the coccinelle script below.

It has been hand modified to use 'dma_set_mask_and_coherent()' instead of
'pci_set_dma_mask()/pci_set_consistent_dma_mask()' when applicable.
This is less verbose.

It has been compile tested.

@@
@@
-    PCI_DMA_BIDIRECTIONAL
+    DMA_BIDIRECTIONAL

@@
@@
-    PCI_DMA_TODEVICE
+    DMA_TO_DEVICE

@@
@@
-    PCI_DMA_FROMDEVICE
+    DMA_FROM_DEVICE

@@
@@
-    PCI_DMA_NONE
+    DMA_NONE

@@
expression e1, e2, e3;
@@
-    pci_alloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

@@
expression e1, e2, e3;
@@
-    pci_zalloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

@@
expression e1, e2, e3, e4;
@@
-    pci_free_consistent(e1, e2, e3, e4)
+    dma_free_coherent(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_single(e1, e2, e3, e4)
+    dma_map_single(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_single(e1, e2, e3, e4)
+    dma_unmap_single(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4, e5;
@@
-    pci_map_page(e1, e2, e3, e4, e5)
+    dma_map_page(&e1->dev, e2, e3, e4, e5)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_page(e1, e2, e3, e4)
+    dma_unmap_page(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_sg(e1, e2, e3, e4)
+    dma_map_sg(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_sg(e1, e2, e3, e4)
+    dma_unmap_sg(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
+    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_device(e1, e2, e3, e4)
+    dma_sync_single_for_device(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
+    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
+    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)

@@
expression e1, e2;
@@
-    pci_dma_mapping_error(e1, e2)
+    dma_mapping_error(&e1->dev, e2)

@@
expression e1, e2;
@@
-    pci_set_dma_mask(e1, e2)
+    dma_set_mask(&e1->dev, e2)

@@
expression e1, e2;
@@
-    pci_set_consistent_dma_mask(e1, e2)
+    dma_set_coherent_mask(&e1->dev, e2)

Link: https://lore.kernel.org/r/259e53b7a00f64bf081d41da8761b171b2ad8f5c.1629634798.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2021-08-23 13:43:54 -03:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qib_6120_regs.h
qib_7220_regs.h
qib_7220.h Merge branch 'timer_setup' into for-next 2017-10-18 13:12:09 -04:00
qib_7322_regs.h
qib_common.h RDMA: Delete not-used static inline functions 2021-03-22 09:31:19 -03:00
qib_debugfs.c infiniband: qib: no need to check return value of debugfs_create functions 2019-01-24 09:22:29 -07:00
qib_debugfs.h
qib_diag.c RDMA: Use u64_to_user_ptr everywhere 2018-03-29 13:42:29 -06:00
qib_driver.c RDMA/hw/qib/qib_driver: Fix misspelling in 'ppd's param description 2021-01-22 14:37:30 -04:00
qib_eeprom.c RDMA/hw/qib/qib_eeprom: Fix misspelling of 'buff' in 'qib_eeprom_{read,write}()' 2021-01-22 14:37:30 -04:00
qib_file_ops.c RDMA: switch from 'pci_' to 'dma_' API 2021-08-23 13:43:54 -03:00
qib_fs.c qib_fs: switch to simple_recursive_removal() 2021-03-08 10:20:48 -05:00
qib_iba6120.c RDMA: Fix kernel-doc compilation warnings 2021-03-22 09:31:19 -03:00
qib_iba7220.c RDMA: Fix kernel-doc compilation warnings 2021-03-22 09:31:19 -03:00
qib_iba7322.c RDMA/qib: Remove useless qib_read_ureg() function 2021-04-13 13:06:25 -03:00
qib_init.c RDMA: switch from 'pci_' to 'dma_' API 2021-08-23 13:43:54 -03:00
qib_intr.c RDMA/hw/qib/qib_intr: Fix a bunch of formatting issues 2021-01-22 14:37:31 -04:00
qib_mad.c RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
qib_mad.h
qib_pcie.c RDMA/hw/qib/qib_pcie: Demote obvious kernel-doc abuse 2021-01-22 14:37:31 -04:00
qib_pio_copy.c
qib_qp.c RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
qib_qsfp.c IB/qib: Remove empty function 2017-01-24 16:20:37 -05:00
qib_qsfp.h IB/qib: Remove empty function 2017-01-24 16:20:37 -05:00
qib_rc.c RDMA/hw/qib/qib_rc: Fix some worthy kernel-docs demote hardly complete one 2021-01-22 14:37:31 -04:00
qib_ruc.c IB/{hfi1, qib, rdmavt}: Move ruc_loopback to rdmavt 2018-10-03 16:38:28 -06:00
qib_sd7220.c IB/qib: Remove redundant assignment to ret 2021-04-30 10:58:15 -03:00
qib_sdma.c RDMA/qib: Convert tasklets to use new tasklet_setup() API 2020-09-03 12:01:53 -03:00
qib_sysfs.c RDMA: Change ops->init_port to ops->port_groups 2021-06-16 20:58:31 -03:00
qib_twsi.c RDMA/hw/qib/qib_twsi: Provide description for missing param 'last' 2021-01-22 14:37:32 -04:00
qib_tx.c RDMA/hw/qib/qib_tx: Provide description for 'qib_chg_pioavailkernel()'s 'rcd' param 2021-01-22 14:37:32 -04:00
qib_uc.c RDMA/hw/qib/qib_uc: Provide description for missing 'flags' param 2021-01-22 14:37:32 -04:00
qib_ud.c RDMA/hw/qib/qib_ud: Provide description for 'qib_make_ud_req's 'flags' param 2021-01-22 14:37:33 -04:00
qib_user_pages.c RDMA: switch from 'pci_' to 'dma_' API 2021-08-23 13:43:54 -03:00
qib_user_sdma.c mm, tree-wide: rename put_user_page*() to unpin_user_page*() 2020-01-31 10:30:38 -08:00
qib_user_sdma.h
qib_verbs.c RDMA: Remove rdma_set_device_sysfs_group() 2021-06-16 20:58:32 -03:00
qib_verbs.h RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
qib_wc_ppc64.c
qib_wc_x86_64.c
qib.h RDMA: Change ops->init_port to ops->port_groups 2021-06-16 20:58:31 -03:00