Unverified Commit a0a072f1 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!634 Accelerator Linux Mainline Patch Round

parents a824b373 2ce167cb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -870,8 +870,8 @@ config CRYPTO_DEV_CCREE
	select CRYPTO_ECB
	select CRYPTO_CTR
	select CRYPTO_XTS
	select CRYPTO_SM4
	select CRYPTO_SM3
	select CRYPTO_SM4_GENERIC
	select CRYPTO_SM3_GENERIC
	help
	  Say 'Y' to enable a driver for the REE interface of the Arm
	  TrustZone CryptoCell family of processors. Currently the
+5 −5
Original line number Diff line number Diff line
@@ -26,8 +26,8 @@ config CRYPTO_DEV_HISI_SEC2
	select CRYPTO_SHA1
	select CRYPTO_SHA256
	select CRYPTO_SHA512
	select CRYPTO_SM4
	depends on PCI && PCI_MSI
	select CRYPTO_SM4_GENERIC
	depends on PCI_MSI
	depends on UACCE || UACCE=n
	depends on ARM64 || (COMPILE_TEST && 64BIT)
	depends on ACPI
@@ -42,7 +42,7 @@ config CRYPTO_DEV_HISI_SEC2
config CRYPTO_DEV_HISI_QM
	tristate
	depends on ARM64 || COMPILE_TEST
	depends on PCI && PCI_MSI
	depends on PCI_MSI
	depends on UACCE || UACCE=n
	depends on ACPI
	help
@@ -51,7 +51,7 @@ config CRYPTO_DEV_HISI_QM

config CRYPTO_DEV_HISI_ZIP
	tristate "Support for HiSilicon ZIP accelerator"
	depends on PCI && PCI_MSI
	depends on PCI_MSI
	depends on ARM64 || (COMPILE_TEST && 64BIT)
	depends on !CPU_BIG_ENDIAN || COMPILE_TEST
	depends on UACCE || UACCE=n
@@ -62,7 +62,7 @@ config CRYPTO_DEV_HISI_ZIP

config CRYPTO_DEV_HISI_HPRE
	tristate "Support for HISI HPRE accelerator"
	depends on PCI && PCI_MSI
	depends on PCI_MSI
	depends on UACCE || UACCE=n
	depends on ARM64 || (COMPILE_TEST && 64BIT)
	depends on ACPI
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ obj-$(CONFIG_CRYPTO_DEV_HISI_HPRE) += hpre/
obj-$(CONFIG_CRYPTO_DEV_HISI_SEC) += sec/
obj-$(CONFIG_CRYPTO_DEV_HISI_SEC2) += sec2/
obj-$(CONFIG_CRYPTO_DEV_HISI_QM) += hisi_qm.o
hisi_qm-objs = qm.o sgl.o
hisi_qm-objs = qm.o sgl.o debugfs.o
obj-$(CONFIG_CRYPTO_DEV_HISI_ZIP) += zip/
obj-$(CONFIG_CRYPTO_DEV_HISI_TRNG) += trng/
obj-$(CONFIG_CRYPTO_DEV_HISI_MIGRATION) += migration/
+1147 −0

File added.

Preview size limit exceeded, changes collapsed.

+13 −6
Original line number Diff line number Diff line
@@ -740,6 +740,8 @@ static int hpre_dh_init_tfm(struct crypto_kpp *tfm)
{
	struct hpre_ctx *ctx = kpp_tfm_ctx(tfm);

	kpp_set_reqsize(tfm, sizeof(struct hpre_asym_request) + HPRE_ALIGN_SZ);

	return hpre_ctx_init(ctx, HPRE_V2_ALG_TYPE);
}

@@ -1165,6 +1167,9 @@ static int hpre_rsa_init_tfm(struct crypto_akcipher *tfm)
		return PTR_ERR(ctx->rsa.soft_tfm);
	}

	akcipher_set_reqsize(tfm, sizeof(struct hpre_asym_request) +
				  HPRE_ALIGN_SZ);

	ret = hpre_ctx_init(ctx, HPRE_V2_ALG_TYPE);
	if (ret)
		crypto_free_akcipher(ctx->rsa.soft_tfm);
@@ -1617,6 +1622,8 @@ static int hpre_ecdh_nist_p192_init_tfm(struct crypto_kpp *tfm)

	ctx->curve_id = ECC_CURVE_NIST_P192;

	kpp_set_reqsize(tfm, sizeof(struct hpre_asym_request) + HPRE_ALIGN_SZ);

	return hpre_ctx_init(ctx, HPRE_V3_ECC_ALG_TYPE);
}

@@ -1626,6 +1633,8 @@ static int hpre_ecdh_nist_p256_init_tfm(struct crypto_kpp *tfm)

	ctx->curve_id = ECC_CURVE_NIST_P256;

	kpp_set_reqsize(tfm, sizeof(struct hpre_asym_request) + HPRE_ALIGN_SZ);

	return hpre_ctx_init(ctx, HPRE_V3_ECC_ALG_TYPE);
}

@@ -1635,6 +1644,8 @@ static int hpre_ecdh_nist_p384_init_tfm(struct crypto_kpp *tfm)

	ctx->curve_id = ECC_CURVE_NIST_P384;

	kpp_set_reqsize(tfm, sizeof(struct hpre_asym_request) + HPRE_ALIGN_SZ);

	return hpre_ctx_init(ctx, HPRE_V3_ECC_ALG_TYPE);
}

@@ -1961,6 +1972,8 @@ static int hpre_curve25519_init_tfm(struct crypto_kpp *tfm)
{
	struct hpre_ctx *ctx = kpp_tfm_ctx(tfm);

	kpp_set_reqsize(tfm, sizeof(struct hpre_asym_request) + HPRE_ALIGN_SZ);

	return hpre_ctx_init(ctx, HPRE_V3_ECC_ALG_TYPE);
}

@@ -1981,7 +1994,6 @@ static struct akcipher_alg rsa = {
	.max_size = hpre_rsa_max_size,
	.init = hpre_rsa_init_tfm,
	.exit = hpre_rsa_exit_tfm,
	.reqsize = sizeof(struct hpre_asym_request) + HPRE_ALIGN_SZ,
	.base = {
		.cra_ctxsize = sizeof(struct hpre_ctx),
		.cra_priority = HPRE_CRYPTO_ALG_PRI,
@@ -1998,7 +2010,6 @@ static struct kpp_alg dh = {
	.max_size = hpre_dh_max_size,
	.init = hpre_dh_init_tfm,
	.exit = hpre_dh_exit_tfm,
	.reqsize = sizeof(struct hpre_asym_request) + HPRE_ALIGN_SZ,
	.base = {
		.cra_ctxsize = sizeof(struct hpre_ctx),
		.cra_priority = HPRE_CRYPTO_ALG_PRI,
@@ -2016,7 +2027,6 @@ static struct kpp_alg ecdh_curves[] = {
		.max_size = hpre_ecdh_max_size,
		.init = hpre_ecdh_nist_p192_init_tfm,
		.exit = hpre_ecdh_exit_tfm,
		.reqsize = sizeof(struct hpre_asym_request) + HPRE_ALIGN_SZ,
		.base = {
			.cra_ctxsize = sizeof(struct hpre_ctx),
			.cra_priority = HPRE_CRYPTO_ALG_PRI,
@@ -2031,7 +2041,6 @@ static struct kpp_alg ecdh_curves[] = {
		.max_size = hpre_ecdh_max_size,
		.init = hpre_ecdh_nist_p256_init_tfm,
		.exit = hpre_ecdh_exit_tfm,
		.reqsize = sizeof(struct hpre_asym_request) + HPRE_ALIGN_SZ,
		.base = {
			.cra_ctxsize = sizeof(struct hpre_ctx),
			.cra_priority = HPRE_CRYPTO_ALG_PRI,
@@ -2046,7 +2055,6 @@ static struct kpp_alg ecdh_curves[] = {
		.max_size = hpre_ecdh_max_size,
		.init = hpre_ecdh_nist_p384_init_tfm,
		.exit = hpre_ecdh_exit_tfm,
		.reqsize = sizeof(struct hpre_asym_request) + HPRE_ALIGN_SZ,
		.base = {
			.cra_ctxsize = sizeof(struct hpre_ctx),
			.cra_priority = HPRE_CRYPTO_ALG_PRI,
@@ -2064,7 +2072,6 @@ static struct kpp_alg curve25519_alg = {
	.max_size = hpre_curve25519_max_size,
	.init = hpre_curve25519_init_tfm,
	.exit = hpre_curve25519_exit_tfm,
	.reqsize = sizeof(struct hpre_asym_request) + HPRE_ALIGN_SZ,
	.base = {
		.cra_ctxsize = sizeof(struct hpre_ctx),
		.cra_priority = HPRE_CRYPTO_ALG_PRI,
Loading