summaryrefslogtreecommitdiffstats
path: root/arch/sparc/crypto/camellia_glue.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-09-15 18:06:30 +0200
committerDavid S. Miller <davem@davemloft.net>2012-09-15 18:06:30 +0200
commit1080362425793f67e36dc690973e13e4a9631b4d (patch)
tree7c41ddc540679c9782ca9b448cbca8f52e9b6d47 /arch/sparc/crypto/camellia_glue.c
parentsparc64: Use cpu_pgsz_mask for linear kernel mapping config. (diff)
downloadlinux-1080362425793f67e36dc690973e13e4a9631b4d.tar.xz
linux-1080362425793f67e36dc690973e13e4a9631b4d.zip
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/camellia_glue.c')
-rw-r--r--arch/sparc/crypto/camellia_glue.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/sparc/crypto/camellia_glue.c b/arch/sparc/crypto/camellia_glue.c
index c258cc550a6b..f45ae69d0d1a 100644
--- a/arch/sparc/crypto/camellia_glue.c
+++ b/arch/sparc/crypto/camellia_glue.c
@@ -14,6 +14,8 @@
#include <asm/pstate.h>
#include <asm/elf.h>
+#include "opcodes.h"
+
#define CAMELLIA_MIN_KEY_SIZE 16
#define CAMELLIA_MAX_KEY_SIZE 32
#define CAMELLIA_BLOCK_SIZE 16
@@ -219,7 +221,7 @@ static int cbc_decrypt(struct blkcipher_desc *desc,
static struct crypto_alg algs[] = { {
.cra_name = "camellia",
.cra_driver_name = "camellia-sparc64",
- .cra_priority = 150,
+ .cra_priority = SPARC_CR_OPCODE_PRIORITY,
.cra_flags = CRYPTO_ALG_TYPE_CIPHER,
.cra_blocksize = CAMELLIA_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct camellia_sparc64_ctx),
@@ -237,7 +239,7 @@ static struct crypto_alg algs[] = { {
}, {
.cra_name = "ecb(camellia)",
.cra_driver_name = "ecb-camellia-sparc64",
- .cra_priority = 150,
+ .cra_priority = SPARC_CR_OPCODE_PRIORITY,
.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER,
.cra_blocksize = CAMELLIA_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct camellia_sparc64_ctx),
@@ -256,7 +258,7 @@ static struct crypto_alg algs[] = { {
}, {
.cra_name = "cbc(camellia)",
.cra_driver_name = "cbc-camellia-sparc64",
- .cra_priority = 150,
+ .cra_priority = SPARC_CR_OPCODE_PRIORITY,
.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER,
.cra_blocksize = CAMELLIA_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct camellia_sparc64_ctx),