linux-stable/drivers/crypto
Christophe JAILLET 0a772f3e46 crypto: hifn_795x - 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 and has been
hand modified to replace GFP_ with a correct flag.
It has been compile tested.

When memory is allocated in 'hifn_probe()' GFP_KERNEL can be used
because it is a probe function and no spin_lock is taken.

@@
@@
-    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)

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2020-08-21 14:45:25 +10:00
..
allwinner mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
amcc crypto: algapi - Remove skbuff.h inclusion 2020-08-20 14:04:28 +10:00
amlogic mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
axis crypto: drivers - set the flag CRYPTO_ALG_ALLOCATES_MEMORY 2020-07-16 21:49:10 +10:00
bcm crypto: drivers - set the flag CRYPTO_ALG_ALLOCATES_MEMORY 2020-07-16 21:49:10 +10:00
caam mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
cavium mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
ccp crypto: algapi - Remove skbuff.h inclusion 2020-08-20 14:04:28 +10:00
ccree mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
chelsio Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-08-05 20:13:21 -07:00
hisilicon crypto: hisilicon/hpre - disable FLR triggered by hardware 2020-07-16 21:49:12 +10:00
inside-secure crypto: inside-secure - irq balance 2020-07-31 18:08:59 +10:00
marvell crypto: algapi - Remove skbuff.h inclusion 2020-08-20 14:04:28 +10:00
mediatek crypto: mediatek - use AES library for GCM key derivation 2020-07-16 21:49:04 +10:00
nx mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
qat crypto: qat - fix double free in qat_uclo_create_batch_init_list 2020-07-23 17:34:17 +10:00
qce crypto: algapi - Remove skbuff.h inclusion 2020-08-20 14:04:28 +10:00
rockchip crypto: algapi - Remove skbuff.h inclusion 2020-08-20 14:04:28 +10:00
stm32 crypto: stm32/crc32 - protect from concurrent accesses 2020-05-23 00:08:21 +10:00
ux500 crypto: algapi - Remove skbuff.h inclusion 2020-08-20 14:04:28 +10:00
virtio virtio: fixes, features 2020-08-11 14:34:17 -07:00
vmx powerpc: Replace HTTP links with HTTPS ones 2020-07-22 00:01:23 +10:00
xilinx crypto: algapi - Remove skbuff.h inclusion 2020-08-20 14:04:28 +10:00
atmel-aes-regs.h
atmel-aes.c crypto: atmel-{aes,sha,tdes} - Retire crypto_platform_data 2020-01-22 16:21:09 +08:00
atmel-authenc.h crypto: remove propagation of CRYPTO_TFM_RES_* flags 2020-01-09 11:30:53 +08:00
atmel-ecc.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
atmel-i2c.c crypto: atmel-i2c - Fix wakeup fail 2020-03-20 14:36:51 +11:00
atmel-i2c.h crypto: atmel - Fix -Wunused-const-variable warning 2019-08-30 18:05:31 +10:00
atmel-sha-regs.h
atmel-sha.c crypto: lib/sha1 - remove unnecessary includes of linux/cryptohash.h 2020-05-08 15:32:17 +10:00
atmel-sha204a.c crypto: atmel-sha204a - Use device-managed registration API 2019-08-02 14:43:59 +10:00
atmel-tdes-regs.h
atmel-tdes.c crypto: atmel-{aes,sha,tdes} - Retire crypto_platform_data 2020-01-22 16:21:09 +08:00
exynos-rng.c crypto: exynos - use devm_platform_ioremap_resource() to simplify code 2019-08-09 15:11:59 +10:00
geode-aes.c crypto: remove propagation of CRYPTO_TFM_RES_* flags 2020-01-09 11:30:53 +08:00
geode-aes.h crypto: geode-aes - convert to skcipher API and make thread-safe 2019-10-23 19:46:56 +11:00
hifn_795x.c crypto: hifn_795x - switch from 'pci_' to 'dma_' API 2020-08-21 14:45:25 +10:00
img-hash.c crypto: algapi - Remove skbuff.h inclusion 2020-08-20 14:04:28 +10:00
ixp4xx_crypto.c crypto: drivers - set the flag CRYPTO_ALG_ALLOCATES_MEMORY 2020-07-16 21:49:10 +10:00
Kconfig crypto: sa2ul - Add crypto driver 2020-07-23 17:34:16 +10:00
Makefile crypto: sa2ul - Add crypto driver 2020-07-23 17:34:16 +10:00
mxs-dcp.c crypto: mxs-dcp - permit asynchronous skcipher as fallback 2020-07-16 21:49:03 +10:00
n2_asm.S
n2_core.c crypto: drivers - set the flag CRYPTO_ALG_ALLOCATES_MEMORY 2020-07-16 21:49:10 +10:00
n2_core.h
omap-aes-gcm.c crypto: omap-aes - avoid spamming console with self tests 2020-06-04 22:03:39 +10:00
omap-aes.c crypto: omap-aes - Fix sparse and compiler warnings 2020-07-23 17:34:19 +10:00
omap-aes.h crypto: omap-aes - permit asynchronous skcipher as fallback 2020-07-16 21:49:02 +10:00
omap-crypto.c crypto: omap-crypto - fix userspace copied buffer access 2020-06-04 22:03:40 +10:00
omap-crypto.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
omap-des.c crypto: omap-des - Fix sparse/compiler warnings 2020-06-26 14:46:42 +10:00
omap-sham.c crypto: omap-sham - Fix sparse/compiler warnings 2020-06-26 14:46:42 +10:00
padlock-aes.c crypto: algapi - Remove skbuff.h inclusion 2020-08-20 14:04:28 +10:00
padlock-sha.c crypto: Convert to new CPU match macros 2020-03-24 21:36:06 +01:00
picoxcell_crypto.c crypto: drivers - set the flag CRYPTO_ALG_ALLOCATES_MEMORY 2020-07-16 21:49:10 +10:00
picoxcell_crypto_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
qcom-rng.c crypto: algapi - Remove skbuff.h inclusion 2020-08-20 14:04:28 +10:00
s5p-sss.c crypto: s5p-sss - use crypto_shash_tfm_digest() 2020-05-08 15:32:14 +10:00
sa2ul.c crypto: sa2ul - Fix inconsistent IS_ERR and PTR_ERR 2020-07-31 18:25:29 +10:00
sa2ul.h crypto: sa2ul - Add AEAD algorithm support 2020-07-23 17:34:17 +10:00
sahara.c crypto: algapi - Remove skbuff.h inclusion 2020-08-20 14:04:28 +10:00
talitos.c crypto: drivers - set the flag CRYPTO_ALG_ALLOCATES_MEMORY 2020-07-16 21:49:10 +10:00
talitos.h crypto: talitos - drop icv_ool 2019-07-03 22:13:11 +08:00