summaryrefslogtreecommitdiff
path: root/arch/sparc/crypto/aes_glue.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-09-15 20:06:30 +0400
committerDavid S. Miller <davem@davemloft.net>2012-09-15 20:06:30 +0400
commit1080362425793f67e36dc690973e13e4a9631b4d (patch)
tree7c41ddc540679c9782ca9b448cbca8f52e9b6d47 /arch/sparc/crypto/aes_glue.c
parentc69ad0a3f7d871aa61fb669fb41c951df6660a61 (diff)
downloadlinux-1080362425793f67e36dc690973e13e4a9631b4d.tar.xz
sparc64: Adjust crypto priorities.
Make the crypto opcode implementations have a higher priority than those provides by the ring buffer based Niagara crypto device. Also, several crypto opcode hashes were not setting the priority value at all. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/crypto/aes_glue.c')
-rw-r--r--arch/sparc/crypto/aes_glue.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/sparc/crypto/aes_glue.c b/arch/sparc/crypto/aes_glue.c
index f457fc69edeb..180bed441aa0 100644
--- a/arch/sparc/crypto/aes_glue.c
+++ b/arch/sparc/crypto/aes_glue.c
@@ -26,6 +26,8 @@
#include <asm/pstate.h>
#include <asm/elf.h>
+#include "opcodes.h"
+
struct aes_ops {
void (*encrypt)(const u64 *key, const u32 *input, u32 *output);
void (*decrypt)(const u64 *key, const u32 *input, u32 *output);
@@ -356,7 +358,7 @@ static int ctr_crypt(struct blkcipher_desc *desc,
static struct crypto_alg algs[] = { {
.cra_name = "aes",
.cra_driver_name = "aes-sparc64",
- .cra_priority = 150,
+ .cra_priority = SPARC_CR_OPCODE_PRIORITY,
.cra_flags = CRYPTO_ALG_TYPE_CIPHER,
.cra_blocksize = AES_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct crypto_sparc64_aes_ctx),
@@ -374,7 +376,7 @@ static struct crypto_alg algs[] = { {
}, {
.cra_name = "ecb(aes)",
.cra_driver_name = "ecb-aes-sparc64",
- .cra_priority = 150,
+ .cra_priority = SPARC_CR_OPCODE_PRIORITY,
.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER,
.cra_blocksize = AES_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct crypto_sparc64_aes_ctx),
@@ -393,7 +395,7 @@ static struct crypto_alg algs[] = { {
}, {
.cra_name = "cbc(aes)",
.cra_driver_name = "cbc-aes-sparc64",
- .cra_priority = 150,
+ .cra_priority = SPARC_CR_OPCODE_PRIORITY,
.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER,
.cra_blocksize = AES_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct crypto_sparc64_aes_ctx),
@@ -412,7 +414,7 @@ static struct crypto_alg algs[] = { {
}, {
.cra_name = "ctr(aes)",
.cra_driver_name = "ctr-aes-sparc64",
- .cra_priority = 150,
+ .cra_priority = SPARC_CR_OPCODE_PRIORITY,
.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER,
.cra_blocksize = AES_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct crypto_sparc64_aes_ctx),