On 2021/4/16 19:26, Herbert Xu wrote:
On Sat, Apr 10, 2021 at 05:49:17PM +0800, Hui Tang wrote:
Currently, an invalid dma address may be unmapped when calling
'xx_data_clr_all' in error path, so check dma address of sqe in/out
whether it has been mapped before calling 'dma_fr
'hpre_cfg_by_dsm' has checked and printed error path internally. It is not
necessary to do it here, so remove it.
It should return error immediately when return value of 'hpre_cfg_by_dsm'
is non-zero, and no need to execute the remaining sentences.
Signed-off-by: Hui
hpre_curve25519_compute_value
-> hpre_curve25519_src_init
-> hpre_curve25519_hw_data_clr_all
Fixes: a9214b0b6ed2(crypto: hisilicon - fix the check on dma address)
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/hpre/hpre_crypto.c | 18 ++
1 file changed, 18 insert
This patchset adds the debug log and cleanup code style.
Hui Tang (3):
crypto: hisilicon/hpre - delete the rudundant space after return
crypto: hisilicon/hpre - use the correct variable type
crypto: hisilicon/hpre - add debug log
drivers/crypto/hisilicon/hpre/hpre_crypto.c | 11
When the received sqe is abnormal, the error message in the sqe written
back by the hardware is printed to help to analyze the abnormal causes.
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/hpre/hpre_crypto.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a
The return value of 'le32_to_cpu' is unsigned, so change the
variable type from 'int' to 'unsigned int'.
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/hpre/hpre_crypto.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/h
There are two spaces after return, just keep one.
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/hpre/hpre_crypto.c | 2 +-
drivers/crypto/hisilicon/hpre/hpre_main.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/hisilicon/hpre/hpre_crypto.c
b
On 2021/4/9 15:33, Herbert Xu wrote:
On Fri, Apr 02, 2021 at 07:24:29PM +0800, Hui Tang wrote:
'hpre_cfg_by_dsm' has checked and printed error path internally. It is not
necessary to do it here, so remove it.
Signed-off-by: Hui Tang
v1 -> v2:
- Return immediately when re
'hpre_cfg_by_dsm' has checked and printed error path internally. It is not
necessary to do it here, so remove it.
Signed-off-by: Hui Tang
v1 -> v2:
- Return immediately when return value of 'hpre_cfg_by_dsm' is non-zero.
---
drivers/crypto/hisilicon/hpre/hpre_main.c |
'xx_debugfs_init' check if debugfs opened.
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/hpre/hpre_main.c | 5 -
drivers/crypto/hisilicon/qm.c | 3 +++
drivers/crypto/hisilicon/sec2/sec_main.c | 5 -
drivers/crypto/hisilicon/zip/zip_main.c | 3 +++
4 fil
It has newline already by sysfs, so delete redundant '\n'
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/hpre/hpre_main.c | 4 ++--
drivers/crypto/hisilicon/sec2/sec_main.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/hisilicon/hpre/hpre
'hpre_cfg_by_dsm' has checked and printed error path, so it is not
necessary at all.
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/hpre/hpre_main.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c
b/driv
s/shoul/should/
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/hpre/hpre_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c
b/drivers/crypto/hisilicon/hpre/hpre_main.c
index f2605c4..8aae921 100644
--- a/drivers/crypto
We must confirm the PASID is disabled before using no-sva mode.
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/hpre/hpre_main.c | 43 +--
1 file changed, 18 insertions(+), 25 deletions(-)
diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c
b/drivers/crypto
hpre select 'CRYPTO_ECDH' and 'CRYPTO_CURVE25519'.
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/hisilicon/Kconfig b/drivers/crypto/hisilicon/Kconfig
index c45adb1..e572f99
When calling "hpre_ctx_set" fails, stop and put qp,
otherwise will leak qp resource.
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/hpre/hpre_crypto.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/hisilicon/hpre/hpre_crypto.c
System may be able to get physical address of zero if not reserved by
firmware.
The dma address obtained by 'dma_alloc_coherent' is valid, since already
checking cpu va before, so do not check again.
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/hpre/hpre_cry
There is redundant code especially when registing new algorithms
in the future.
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/hpre/hpre_crypto.c | 19 +--
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/drivers/crypto/hisilicon/hpre/hpre_crypto.c
b/drivers
Remove 'CONFIG_CRYPTO_DH' and optimise 'hpre_algs_register' error path.
Hui Tang (2):
crypto: hisilicon/hpre - delete wrap of 'CONFIG_CRYPTO_DH'
crypto: hisilicon/hpre - optimise 'hpre_algs_register' error path
drivers/
'CRYPTO_DH' has selected in 'Kconfig', so delete 'CONFIG_CRYPTO_DH'.
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/hpre/hpre_crypto.c | 11 +--
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/crypto/hisilicon/hpre/hpre_crypto
DMA_TO_DEVICE synchronisation must be done after the last modification
of the memory region by the software and before it is handed off to
the device.
Signed-off-by: Hui Tang
Reported-by: kernel test robot
Reported-by: Dan Carpenter
---
drivers/crypto/qat/qat_common/qat_algs.c | 27
'dma_mapping_error' return a negative value if 'dma_addr' is equal to
'DMA_MAPPING_ERROR' not zero, so fix initialization of 'dma_addr'.
Signed-off-by: Hui Tang
---
drivers/crypto/qat/qat_common/qat_algs.c | 11 +--
1 file changed, 9 insertions(
This patchset fix bugs related to 'dma_map_single' use:
Hui Tang (2):
crypto: qat - fix 'dma_unmap_single' invalid address
crypto: qat - fix use of 'dma_map_single'
v1 -> v2:
1.fix build warning reported by kernel test rebot
2.add patch #
DMA_TO_DEVICE synchronisation must be done after the last modification
of the memory region by the software and before it is handed off to
the device.
Signed-off-by: Hui Tang
---
drivers/crypto/qat/qat_common/qat_algs.c | 23 ---
1 file changed, 12 insertions(+), 11
Enable x25519/x448/ecdh/ecdsa/sm2 algorithm on Kunpeng 930.
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/hpre/hpre_main.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c
b/drivers/crypto/hisilicon/hpre/hpre_main.c
From: Weili Qian
Calling 'dma_map_single' after the data is written to
ensure that the cpu cache and dma cache are consistent.
Signed-off-by: Weili Qian
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/qm.c | 50 +++
1 file changed, 27
Update since some special settings only for Kunpeng920.
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/hpre/hpre_main.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c
b/drivers/crypto/hisilicon/hpre/hpre_main.c
From: Weili Qian
Enable PASID by setting 'sqc' and 'cqc' pasid bits
per queue in Kunpeng 930.
For Kunpeng 920, PASID is effective for all queues once set
in SVA scenarios.
Signed-off-by: Weili Qian
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/h
1.Update clusters number for both Kunpeng920 and Kunpeng930.
2.Some bugfixs only on Kunpeng920, so added hardware version wrap.
3.Fix use of 'dma_map_single'.
4.Fix PASID on Kunpeng930.
Hui Tang (2):
crypto: hisilicon/hpre - adapt the number of clusters
crypto: hisilicon/hpre
HPRE of Kunpeng 930 is updated on cluster numbers,
so we try to update this driver to make it running
okay on Kunpeng920/Kunpeng930 chips.
Signed-off-by: Hui Tang
---
drivers/crypto/hisilicon/hpre/hpre.h | 8 ++--
drivers/crypto/hisilicon/hpre/hpre_main.c | 71
Uacce SysFS support more algorithms inqury such as
'ecdh/ecdsa/sm2/x25519/x448'
Signed-off-by: Hui Tang
Reviewed-by: Zaibo Xu
---
drivers/crypto/hisilicon/hpre/hpre_main.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/hisilicon/hpre/hpre
1.One CE error is detecting timeout of generating a random number.
2.Another is detecting timeout of SVA prefetching address.
Signed-off-by: Hui Tang
Reviewed-by: Zaibo Xu
---
drivers/crypto/hisilicon/hpre/hpre_main.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a
Delete 'HPRE_RAS_ECC1BIT_TH' register setting of hpre,
since register 'QM_RAS_CE_THRESHOLD' of qm has done this work.
Signed-off-by: Hui Tang
Reviewed-by: Zaibo Xu
---
drivers/crypto/hisilicon/hpre/hpre_main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/c
33 matches
Mail list logo