diff options
-rw-r--r-- | arch/x86/crypto/aesni-intel_glue.c | 4 | ||||
-rw-r--r-- | drivers/crypto/ccp/ccp-crypto-main.c | 4 | ||||
-rw-r--r-- | drivers/crypto/ccp/ccp-dev.c | 14 | ||||
-rw-r--r-- | drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.h | 2 | ||||
-rw-r--r-- | include/linux/ccp.h | 12 |
5 files changed, 33 insertions, 3 deletions
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index 888950f29fd9..a7ccd57f19e4 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c | |||
@@ -481,7 +481,7 @@ static void ctr_crypt_final(struct crypto_aes_ctx *ctx, | |||
481 | crypto_inc(ctrblk, AES_BLOCK_SIZE); | 481 | crypto_inc(ctrblk, AES_BLOCK_SIZE); |
482 | } | 482 | } |
483 | 483 | ||
484 | #ifdef CONFIG_AS_AVX | 484 | #if 0 /* temporary disabled due to failing crypto tests */ |
485 | static void aesni_ctr_enc_avx_tfm(struct crypto_aes_ctx *ctx, u8 *out, | 485 | static void aesni_ctr_enc_avx_tfm(struct crypto_aes_ctx *ctx, u8 *out, |
486 | const u8 *in, unsigned int len, u8 *iv) | 486 | const u8 *in, unsigned int len, u8 *iv) |
487 | { | 487 | { |
@@ -1522,7 +1522,7 @@ static int __init aesni_init(void) | |||
1522 | aesni_gcm_dec_tfm = aesni_gcm_dec; | 1522 | aesni_gcm_dec_tfm = aesni_gcm_dec; |
1523 | } | 1523 | } |
1524 | aesni_ctr_enc_tfm = aesni_ctr_enc; | 1524 | aesni_ctr_enc_tfm = aesni_ctr_enc; |
1525 | #ifdef CONFIG_AS_AVX | 1525 | #if 0 /* temporary disabled due to failing crypto tests */ |
1526 | if (cpu_has_avx) { | 1526 | if (cpu_has_avx) { |
1527 | /* optimize performance of ctr mode encryption transform */ | 1527 | /* optimize performance of ctr mode encryption transform */ |
1528 | aesni_ctr_enc_tfm = aesni_ctr_enc_avx_tfm; | 1528 | aesni_ctr_enc_tfm = aesni_ctr_enc_avx_tfm; |
diff --git a/drivers/crypto/ccp/ccp-crypto-main.c b/drivers/crypto/ccp/ccp-crypto-main.c index 20dc848481e7..4d4e016d755b 100644 --- a/drivers/crypto/ccp/ccp-crypto-main.c +++ b/drivers/crypto/ccp/ccp-crypto-main.c | |||
@@ -367,6 +367,10 @@ static int ccp_crypto_init(void) | |||
367 | { | 367 | { |
368 | int ret; | 368 | int ret; |
369 | 369 | ||
370 | ret = ccp_present(); | ||
371 | if (ret) | ||
372 | return ret; | ||
373 | |||
370 | spin_lock_init(&req_queue_lock); | 374 | spin_lock_init(&req_queue_lock); |
371 | INIT_LIST_HEAD(&req_queue.cmds); | 375 | INIT_LIST_HEAD(&req_queue.cmds); |
372 | req_queue.backlog = &req_queue.cmds; | 376 | req_queue.backlog = &req_queue.cmds; |
diff --git a/drivers/crypto/ccp/ccp-dev.c b/drivers/crypto/ccp/ccp-dev.c index a7d110652a74..c6e6171eb6d3 100644 --- a/drivers/crypto/ccp/ccp-dev.c +++ b/drivers/crypto/ccp/ccp-dev.c | |||
@@ -55,6 +55,20 @@ static inline void ccp_del_device(struct ccp_device *ccp) | |||
55 | } | 55 | } |
56 | 56 | ||
57 | /** | 57 | /** |
58 | * ccp_present - check if a CCP device is present | ||
59 | * | ||
60 | * Returns zero if a CCP device is present, -ENODEV otherwise. | ||
61 | */ | ||
62 | int ccp_present(void) | ||
63 | { | ||
64 | if (ccp_get_device()) | ||
65 | return 0; | ||
66 | |||
67 | return -ENODEV; | ||
68 | } | ||
69 | EXPORT_SYMBOL_GPL(ccp_present); | ||
70 | |||
71 | /** | ||
58 | * ccp_enqueue_cmd - queue an operation for processing by the CCP | 72 | * ccp_enqueue_cmd - queue an operation for processing by the CCP |
59 | * | 73 | * |
60 | * @cmd: ccp_cmd struct to be processed | 74 | * @cmd: ccp_cmd struct to be processed |
diff --git a/drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.h b/drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.h index b707f292b377..65dd1ff93d3b 100644 --- a/drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.h +++ b/drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.h | |||
@@ -66,7 +66,7 @@ | |||
66 | #define ADF_DH895XCC_ETR_MAX_BANKS 32 | 66 | #define ADF_DH895XCC_ETR_MAX_BANKS 32 |
67 | #define ADF_DH895XCC_SMIAPF0_MASK_OFFSET (0x3A000 + 0x28) | 67 | #define ADF_DH895XCC_SMIAPF0_MASK_OFFSET (0x3A000 + 0x28) |
68 | #define ADF_DH895XCC_SMIAPF1_MASK_OFFSET (0x3A000 + 0x30) | 68 | #define ADF_DH895XCC_SMIAPF1_MASK_OFFSET (0x3A000 + 0x30) |
69 | #define ADF_DH895XCC_SMIA0_MASK 0xFFFF | 69 | #define ADF_DH895XCC_SMIA0_MASK 0xFFFFFFFF |
70 | #define ADF_DH895XCC_SMIA1_MASK 0x1 | 70 | #define ADF_DH895XCC_SMIA1_MASK 0x1 |
71 | /* Error detection and correction */ | 71 | /* Error detection and correction */ |
72 | #define ADF_DH895XCC_AE_CTX_ENABLES(i) (i * 0x1000 + 0x20818) | 72 | #define ADF_DH895XCC_AE_CTX_ENABLES(i) (i * 0x1000 + 0x20818) |
diff --git a/include/linux/ccp.h b/include/linux/ccp.h index ebcc9d146219..7f437036baa4 100644 --- a/include/linux/ccp.h +++ b/include/linux/ccp.h | |||
@@ -27,6 +27,13 @@ struct ccp_cmd; | |||
27 | defined(CONFIG_CRYPTO_DEV_CCP_DD_MODULE) | 27 | defined(CONFIG_CRYPTO_DEV_CCP_DD_MODULE) |
28 | 28 | ||
29 | /** | 29 | /** |
30 | * ccp_present - check if a CCP device is present | ||
31 | * | ||
32 | * Returns zero if a CCP device is present, -ENODEV otherwise. | ||
33 | */ | ||
34 | int ccp_present(void); | ||
35 | |||
36 | /** | ||
30 | * ccp_enqueue_cmd - queue an operation for processing by the CCP | 37 | * ccp_enqueue_cmd - queue an operation for processing by the CCP |
31 | * | 38 | * |
32 | * @cmd: ccp_cmd struct to be processed | 39 | * @cmd: ccp_cmd struct to be processed |
@@ -53,6 +60,11 @@ int ccp_enqueue_cmd(struct ccp_cmd *cmd); | |||
53 | 60 | ||
54 | #else /* CONFIG_CRYPTO_DEV_CCP_DD is not enabled */ | 61 | #else /* CONFIG_CRYPTO_DEV_CCP_DD is not enabled */ |
55 | 62 | ||
63 | static inline int ccp_present(void) | ||
64 | { | ||
65 | return -ENODEV; | ||
66 | } | ||
67 | |||
56 | static inline int ccp_enqueue_cmd(struct ccp_cmd *cmd) | 68 | static inline int ccp_enqueue_cmd(struct ccp_cmd *cmd) |
57 | { | 69 | { |
58 | return -ENODEV; | 70 | return -ENODEV; |