diff options
-rw-r--r-- | arch/sparc/crypto/aes_glue.c | 10 | ||||
-rw-r--r-- | arch/sparc/crypto/camellia_glue.c | 8 | ||||
-rw-r--r-- | arch/sparc/crypto/crc32c_glue.c | 4 | ||||
-rw-r--r-- | arch/sparc/crypto/des_glue.c | 14 | ||||
-rw-r--r-- | arch/sparc/crypto/md5_glue.c | 4 | ||||
-rw-r--r-- | arch/sparc/crypto/opcodes.h | 2 | ||||
-rw-r--r-- | arch/sparc/crypto/sha1_glue.c | 4 | ||||
-rw-r--r-- | arch/sparc/crypto/sha256_glue.c | 4 | ||||
-rw-r--r-- | arch/sparc/crypto/sha512_glue.c | 4 | ||||
-rw-r--r-- | drivers/crypto/n2_core.c | 2 |
10 files changed, 39 insertions, 17 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 @@ | |||
26 | #include <asm/pstate.h> | 26 | #include <asm/pstate.h> |
27 | #include <asm/elf.h> | 27 | #include <asm/elf.h> |
28 | 28 | ||
29 | #include "opcodes.h" | ||
30 | |||
29 | struct aes_ops { | 31 | struct aes_ops { |
30 | void (*encrypt)(const u64 *key, const u32 *input, u32 *output); | 32 | void (*encrypt)(const u64 *key, const u32 *input, u32 *output); |
31 | void (*decrypt)(const u64 *key, const u32 *input, u32 *output); | 33 | void (*decrypt)(const u64 *key, const u32 *input, u32 *output); |
@@ -356,7 +358,7 @@ static int ctr_crypt(struct blkcipher_desc *desc, | |||
356 | static struct crypto_alg algs[] = { { | 358 | static struct crypto_alg algs[] = { { |
357 | .cra_name = "aes", | 359 | .cra_name = "aes", |
358 | .cra_driver_name = "aes-sparc64", | 360 | .cra_driver_name = "aes-sparc64", |
359 | .cra_priority = 150, | 361 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, |
360 | .cra_flags = CRYPTO_ALG_TYPE_CIPHER, | 362 | .cra_flags = CRYPTO_ALG_TYPE_CIPHER, |
361 | .cra_blocksize = AES_BLOCK_SIZE, | 363 | .cra_blocksize = AES_BLOCK_SIZE, |
362 | .cra_ctxsize = sizeof(struct crypto_sparc64_aes_ctx), | 364 | .cra_ctxsize = sizeof(struct crypto_sparc64_aes_ctx), |
@@ -374,7 +376,7 @@ static struct crypto_alg algs[] = { { | |||
374 | }, { | 376 | }, { |
375 | .cra_name = "ecb(aes)", | 377 | .cra_name = "ecb(aes)", |
376 | .cra_driver_name = "ecb-aes-sparc64", | 378 | .cra_driver_name = "ecb-aes-sparc64", |
377 | .cra_priority = 150, | 379 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, |
378 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, | 380 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, |
379 | .cra_blocksize = AES_BLOCK_SIZE, | 381 | .cra_blocksize = AES_BLOCK_SIZE, |
380 | .cra_ctxsize = sizeof(struct crypto_sparc64_aes_ctx), | 382 | .cra_ctxsize = sizeof(struct crypto_sparc64_aes_ctx), |
@@ -393,7 +395,7 @@ static struct crypto_alg algs[] = { { | |||
393 | }, { | 395 | }, { |
394 | .cra_name = "cbc(aes)", | 396 | .cra_name = "cbc(aes)", |
395 | .cra_driver_name = "cbc-aes-sparc64", | 397 | .cra_driver_name = "cbc-aes-sparc64", |
396 | .cra_priority = 150, | 398 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, |
397 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, | 399 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, |
398 | .cra_blocksize = AES_BLOCK_SIZE, | 400 | .cra_blocksize = AES_BLOCK_SIZE, |
399 | .cra_ctxsize = sizeof(struct crypto_sparc64_aes_ctx), | 401 | .cra_ctxsize = sizeof(struct crypto_sparc64_aes_ctx), |
@@ -412,7 +414,7 @@ static struct crypto_alg algs[] = { { | |||
412 | }, { | 414 | }, { |
413 | .cra_name = "ctr(aes)", | 415 | .cra_name = "ctr(aes)", |
414 | .cra_driver_name = "ctr-aes-sparc64", | 416 | .cra_driver_name = "ctr-aes-sparc64", |
415 | .cra_priority = 150, | 417 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, |
416 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, | 418 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, |
417 | .cra_blocksize = AES_BLOCK_SIZE, | 419 | .cra_blocksize = AES_BLOCK_SIZE, |
418 | .cra_ctxsize = sizeof(struct crypto_sparc64_aes_ctx), | 420 | .cra_ctxsize = sizeof(struct crypto_sparc64_aes_ctx), |
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 @@ | |||
14 | #include <asm/pstate.h> | 14 | #include <asm/pstate.h> |
15 | #include <asm/elf.h> | 15 | #include <asm/elf.h> |
16 | 16 | ||
17 | #include "opcodes.h" | ||
18 | |||
17 | #define CAMELLIA_MIN_KEY_SIZE 16 | 19 | #define CAMELLIA_MIN_KEY_SIZE 16 |
18 | #define CAMELLIA_MAX_KEY_SIZE 32 | 20 | #define CAMELLIA_MAX_KEY_SIZE 32 |
19 | #define CAMELLIA_BLOCK_SIZE 16 | 21 | #define CAMELLIA_BLOCK_SIZE 16 |
@@ -219,7 +221,7 @@ static int cbc_decrypt(struct blkcipher_desc *desc, | |||
219 | static struct crypto_alg algs[] = { { | 221 | static struct crypto_alg algs[] = { { |
220 | .cra_name = "camellia", | 222 | .cra_name = "camellia", |
221 | .cra_driver_name = "camellia-sparc64", | 223 | .cra_driver_name = "camellia-sparc64", |
222 | .cra_priority = 150, | 224 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, |
223 | .cra_flags = CRYPTO_ALG_TYPE_CIPHER, | 225 | .cra_flags = CRYPTO_ALG_TYPE_CIPHER, |
224 | .cra_blocksize = CAMELLIA_BLOCK_SIZE, | 226 | .cra_blocksize = CAMELLIA_BLOCK_SIZE, |
225 | .cra_ctxsize = sizeof(struct camellia_sparc64_ctx), | 227 | .cra_ctxsize = sizeof(struct camellia_sparc64_ctx), |
@@ -237,7 +239,7 @@ static struct crypto_alg algs[] = { { | |||
237 | }, { | 239 | }, { |
238 | .cra_name = "ecb(camellia)", | 240 | .cra_name = "ecb(camellia)", |
239 | .cra_driver_name = "ecb-camellia-sparc64", | 241 | .cra_driver_name = "ecb-camellia-sparc64", |
240 | .cra_priority = 150, | 242 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, |
241 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, | 243 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, |
242 | .cra_blocksize = CAMELLIA_BLOCK_SIZE, | 244 | .cra_blocksize = CAMELLIA_BLOCK_SIZE, |
243 | .cra_ctxsize = sizeof(struct camellia_sparc64_ctx), | 245 | .cra_ctxsize = sizeof(struct camellia_sparc64_ctx), |
@@ -256,7 +258,7 @@ static struct crypto_alg algs[] = { { | |||
256 | }, { | 258 | }, { |
257 | .cra_name = "cbc(camellia)", | 259 | .cra_name = "cbc(camellia)", |
258 | .cra_driver_name = "cbc-camellia-sparc64", | 260 | .cra_driver_name = "cbc-camellia-sparc64", |
259 | .cra_priority = 150, | 261 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, |
260 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, | 262 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, |
261 | .cra_blocksize = CAMELLIA_BLOCK_SIZE, | 263 | .cra_blocksize = CAMELLIA_BLOCK_SIZE, |
262 | .cra_ctxsize = sizeof(struct camellia_sparc64_ctx), | 264 | .cra_ctxsize = sizeof(struct camellia_sparc64_ctx), |
diff --git a/arch/sparc/crypto/crc32c_glue.c b/arch/sparc/crypto/crc32c_glue.c index ec31cdb20a14..0bd89cea8d8e 100644 --- a/arch/sparc/crypto/crc32c_glue.c +++ b/arch/sparc/crypto/crc32c_glue.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <asm/pstate.h> | 20 | #include <asm/pstate.h> |
21 | #include <asm/elf.h> | 21 | #include <asm/elf.h> |
22 | 22 | ||
23 | #include "opcodes.h" | ||
24 | |||
23 | /* | 25 | /* |
24 | * Setting the seed allows arbitrary accumulators and flexible XOR policy | 26 | * Setting the seed allows arbitrary accumulators and flexible XOR policy |
25 | * If your algorithm starts with ~0, then XOR with ~0 before you set | 27 | * If your algorithm starts with ~0, then XOR with ~0 before you set |
@@ -130,7 +132,7 @@ static struct shash_alg alg = { | |||
130 | .base = { | 132 | .base = { |
131 | .cra_name = "crc32c", | 133 | .cra_name = "crc32c", |
132 | .cra_driver_name = "crc32c-sparc64", | 134 | .cra_driver_name = "crc32c-sparc64", |
133 | .cra_priority = 150, | 135 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, |
134 | .cra_blocksize = CHKSUM_BLOCK_SIZE, | 136 | .cra_blocksize = CHKSUM_BLOCK_SIZE, |
135 | .cra_ctxsize = sizeof(u32), | 137 | .cra_ctxsize = sizeof(u32), |
136 | .cra_alignmask = 7, | 138 | .cra_alignmask = 7, |
diff --git a/arch/sparc/crypto/des_glue.c b/arch/sparc/crypto/des_glue.c index 5ec0309e48c0..77d2ad6e899e 100644 --- a/arch/sparc/crypto/des_glue.c +++ b/arch/sparc/crypto/des_glue.c | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <asm/pstate.h> | 15 | #include <asm/pstate.h> |
16 | #include <asm/elf.h> | 16 | #include <asm/elf.h> |
17 | 17 | ||
18 | #include "opcodes.h" | ||
19 | |||
18 | struct des_sparc64_ctx { | 20 | struct des_sparc64_ctx { |
19 | u64 encrypt_expkey[DES_EXPKEY_WORDS / 2]; | 21 | u64 encrypt_expkey[DES_EXPKEY_WORDS / 2]; |
20 | u64 decrypt_expkey[DES_EXPKEY_WORDS / 2]; | 22 | u64 decrypt_expkey[DES_EXPKEY_WORDS / 2]; |
@@ -371,7 +373,7 @@ static int cbc3_decrypt(struct blkcipher_desc *desc, | |||
371 | static struct crypto_alg algs[] = { { | 373 | static struct crypto_alg algs[] = { { |
372 | .cra_name = "des", | 374 | .cra_name = "des", |
373 | .cra_driver_name = "des-sparc64", | 375 | .cra_driver_name = "des-sparc64", |
374 | .cra_priority = 150, | 376 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, |
375 | .cra_flags = CRYPTO_ALG_TYPE_CIPHER, | 377 | .cra_flags = CRYPTO_ALG_TYPE_CIPHER, |
376 | .cra_blocksize = DES_BLOCK_SIZE, | 378 | .cra_blocksize = DES_BLOCK_SIZE, |
377 | .cra_ctxsize = sizeof(struct des_sparc64_ctx), | 379 | .cra_ctxsize = sizeof(struct des_sparc64_ctx), |
@@ -389,7 +391,7 @@ static struct crypto_alg algs[] = { { | |||
389 | }, { | 391 | }, { |
390 | .cra_name = "ecb(des)", | 392 | .cra_name = "ecb(des)", |
391 | .cra_driver_name = "ecb-des-sparc64", | 393 | .cra_driver_name = "ecb-des-sparc64", |
392 | .cra_priority = 150, | 394 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, |
393 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, | 395 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, |
394 | .cra_blocksize = DES_BLOCK_SIZE, | 396 | .cra_blocksize = DES_BLOCK_SIZE, |
395 | .cra_ctxsize = sizeof(struct des_sparc64_ctx), | 397 | .cra_ctxsize = sizeof(struct des_sparc64_ctx), |
@@ -408,7 +410,7 @@ static struct crypto_alg algs[] = { { | |||
408 | }, { | 410 | }, { |
409 | .cra_name = "cbc(des)", | 411 | .cra_name = "cbc(des)", |
410 | .cra_driver_name = "cbc-des-sparc64", | 412 | .cra_driver_name = "cbc-des-sparc64", |
411 | .cra_priority = 150, | 413 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, |
412 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, | 414 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, |
413 | .cra_blocksize = DES_BLOCK_SIZE, | 415 | .cra_blocksize = DES_BLOCK_SIZE, |
414 | .cra_ctxsize = sizeof(struct des_sparc64_ctx), | 416 | .cra_ctxsize = sizeof(struct des_sparc64_ctx), |
@@ -427,7 +429,7 @@ static struct crypto_alg algs[] = { { | |||
427 | }, { | 429 | }, { |
428 | .cra_name = "des3_ede", | 430 | .cra_name = "des3_ede", |
429 | .cra_driver_name = "des3_ede-sparc64", | 431 | .cra_driver_name = "des3_ede-sparc64", |
430 | .cra_priority = 150, | 432 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, |
431 | .cra_flags = CRYPTO_ALG_TYPE_CIPHER, | 433 | .cra_flags = CRYPTO_ALG_TYPE_CIPHER, |
432 | .cra_blocksize = DES3_EDE_BLOCK_SIZE, | 434 | .cra_blocksize = DES3_EDE_BLOCK_SIZE, |
433 | .cra_ctxsize = sizeof(struct des3_ede_sparc64_ctx), | 435 | .cra_ctxsize = sizeof(struct des3_ede_sparc64_ctx), |
@@ -445,7 +447,7 @@ static struct crypto_alg algs[] = { { | |||
445 | }, { | 447 | }, { |
446 | .cra_name = "ecb(des3_ede)", | 448 | .cra_name = "ecb(des3_ede)", |
447 | .cra_driver_name = "ecb-des3_ede-sparc64", | 449 | .cra_driver_name = "ecb-des3_ede-sparc64", |
448 | .cra_priority = 150, | 450 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, |
449 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, | 451 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, |
450 | .cra_blocksize = DES3_EDE_BLOCK_SIZE, | 452 | .cra_blocksize = DES3_EDE_BLOCK_SIZE, |
451 | .cra_ctxsize = sizeof(struct des3_ede_sparc64_ctx), | 453 | .cra_ctxsize = sizeof(struct des3_ede_sparc64_ctx), |
@@ -464,7 +466,7 @@ static struct crypto_alg algs[] = { { | |||
464 | }, { | 466 | }, { |
465 | .cra_name = "cbc(des3_ede)", | 467 | .cra_name = "cbc(des3_ede)", |
466 | .cra_driver_name = "cbc-des3_ede-sparc64", | 468 | .cra_driver_name = "cbc-des3_ede-sparc64", |
467 | .cra_priority = 150, | 469 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, |
468 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, | 470 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, |
469 | .cra_blocksize = DES3_EDE_BLOCK_SIZE, | 471 | .cra_blocksize = DES3_EDE_BLOCK_SIZE, |
470 | .cra_ctxsize = sizeof(struct des3_ede_sparc64_ctx), | 472 | .cra_ctxsize = sizeof(struct des3_ede_sparc64_ctx), |
diff --git a/arch/sparc/crypto/md5_glue.c b/arch/sparc/crypto/md5_glue.c index bdfcfefbd4fd..603d723038ce 100644 --- a/arch/sparc/crypto/md5_glue.c +++ b/arch/sparc/crypto/md5_glue.c | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <asm/pstate.h> | 24 | #include <asm/pstate.h> |
25 | #include <asm/elf.h> | 25 | #include <asm/elf.h> |
26 | 26 | ||
27 | #include "opcodes.h" | ||
28 | |||
27 | asmlinkage void md5_sparc64_transform(u32 *digest, const char *data, | 29 | asmlinkage void md5_sparc64_transform(u32 *digest, const char *data, |
28 | unsigned int rounds); | 30 | unsigned int rounds); |
29 | 31 | ||
@@ -141,7 +143,7 @@ static struct shash_alg alg = { | |||
141 | .base = { | 143 | .base = { |
142 | .cra_name = "md5", | 144 | .cra_name = "md5", |
143 | .cra_driver_name= "md5-sparc64", | 145 | .cra_driver_name= "md5-sparc64", |
144 | .cra_priority = 150, | 146 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, |
145 | .cra_flags = CRYPTO_ALG_TYPE_SHASH, | 147 | .cra_flags = CRYPTO_ALG_TYPE_SHASH, |
146 | .cra_blocksize = MD5_HMAC_BLOCK_SIZE, | 148 | .cra_blocksize = MD5_HMAC_BLOCK_SIZE, |
147 | .cra_module = THIS_MODULE, | 149 | .cra_module = THIS_MODULE, |
diff --git a/arch/sparc/crypto/opcodes.h b/arch/sparc/crypto/opcodes.h index b6c4a1556354..19cbaea6976f 100644 --- a/arch/sparc/crypto/opcodes.h +++ b/arch/sparc/crypto/opcodes.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _OPCODES_H | 1 | #ifndef _OPCODES_H |
2 | #define _OPCODES_H | 2 | #define _OPCODES_H |
3 | 3 | ||
4 | #define SPARC_CR_OPCODE_PRIORITY 300 | ||
5 | |||
4 | #define F3F(x,y,z) (((x)<<30)|((y)<<19)|((z)<<5)) | 6 | #define F3F(x,y,z) (((x)<<30)|((y)<<19)|((z)<<5)) |
5 | 7 | ||
6 | #define FPD_ENCODE(x) (((x) >> 5) | ((x) & ~(0x20))) | 8 | #define FPD_ENCODE(x) (((x) >> 5) | ((x) & ~(0x20))) |
diff --git a/arch/sparc/crypto/sha1_glue.c b/arch/sparc/crypto/sha1_glue.c index 6bd1abc5489d..2bbb20bee9f1 100644 --- a/arch/sparc/crypto/sha1_glue.c +++ b/arch/sparc/crypto/sha1_glue.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <asm/pstate.h> | 21 | #include <asm/pstate.h> |
22 | #include <asm/elf.h> | 22 | #include <asm/elf.h> |
23 | 23 | ||
24 | #include "opcodes.h" | ||
25 | |||
24 | asmlinkage void sha1_sparc64_transform(u32 *digest, const char *data, | 26 | asmlinkage void sha1_sparc64_transform(u32 *digest, const char *data, |
25 | unsigned int rounds); | 27 | unsigned int rounds); |
26 | 28 | ||
@@ -136,7 +138,7 @@ static struct shash_alg alg = { | |||
136 | .base = { | 138 | .base = { |
137 | .cra_name = "sha1", | 139 | .cra_name = "sha1", |
138 | .cra_driver_name= "sha1-sparc64", | 140 | .cra_driver_name= "sha1-sparc64", |
139 | .cra_priority = 150, | 141 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, |
140 | .cra_flags = CRYPTO_ALG_TYPE_SHASH, | 142 | .cra_flags = CRYPTO_ALG_TYPE_SHASH, |
141 | .cra_blocksize = SHA1_BLOCK_SIZE, | 143 | .cra_blocksize = SHA1_BLOCK_SIZE, |
142 | .cra_module = THIS_MODULE, | 144 | .cra_module = THIS_MODULE, |
diff --git a/arch/sparc/crypto/sha256_glue.c b/arch/sparc/crypto/sha256_glue.c index 75e1adeeb024..591e656bd891 100644 --- a/arch/sparc/crypto/sha256_glue.c +++ b/arch/sparc/crypto/sha256_glue.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <asm/pstate.h> | 21 | #include <asm/pstate.h> |
22 | #include <asm/elf.h> | 22 | #include <asm/elf.h> |
23 | 23 | ||
24 | #include "opcodes.h" | ||
25 | |||
24 | asmlinkage void sha256_sparc64_transform(u32 *digest, const char *data, | 26 | asmlinkage void sha256_sparc64_transform(u32 *digest, const char *data, |
25 | unsigned int rounds); | 27 | unsigned int rounds); |
26 | 28 | ||
@@ -166,6 +168,7 @@ static struct shash_alg sha256 = { | |||
166 | .base = { | 168 | .base = { |
167 | .cra_name = "sha256", | 169 | .cra_name = "sha256", |
168 | .cra_driver_name= "sha256-sparc64", | 170 | .cra_driver_name= "sha256-sparc64", |
171 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, | ||
169 | .cra_flags = CRYPTO_ALG_TYPE_SHASH, | 172 | .cra_flags = CRYPTO_ALG_TYPE_SHASH, |
170 | .cra_blocksize = SHA256_BLOCK_SIZE, | 173 | .cra_blocksize = SHA256_BLOCK_SIZE, |
171 | .cra_module = THIS_MODULE, | 174 | .cra_module = THIS_MODULE, |
@@ -181,6 +184,7 @@ static struct shash_alg sha224 = { | |||
181 | .base = { | 184 | .base = { |
182 | .cra_name = "sha224", | 185 | .cra_name = "sha224", |
183 | .cra_driver_name= "sha224-sparc64", | 186 | .cra_driver_name= "sha224-sparc64", |
187 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, | ||
184 | .cra_flags = CRYPTO_ALG_TYPE_SHASH, | 188 | .cra_flags = CRYPTO_ALG_TYPE_SHASH, |
185 | .cra_blocksize = SHA224_BLOCK_SIZE, | 189 | .cra_blocksize = SHA224_BLOCK_SIZE, |
186 | .cra_module = THIS_MODULE, | 190 | .cra_module = THIS_MODULE, |
diff --git a/arch/sparc/crypto/sha512_glue.c b/arch/sparc/crypto/sha512_glue.c index 4d960be401c4..486f0a2b7001 100644 --- a/arch/sparc/crypto/sha512_glue.c +++ b/arch/sparc/crypto/sha512_glue.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <asm/pstate.h> | 20 | #include <asm/pstate.h> |
21 | #include <asm/elf.h> | 21 | #include <asm/elf.h> |
22 | 22 | ||
23 | #include "opcodes.h" | ||
24 | |||
23 | asmlinkage void sha512_sparc64_transform(u64 *digest, const char *data, | 25 | asmlinkage void sha512_sparc64_transform(u64 *digest, const char *data, |
24 | unsigned int rounds); | 26 | unsigned int rounds); |
25 | 27 | ||
@@ -151,6 +153,7 @@ static struct shash_alg sha512 = { | |||
151 | .base = { | 153 | .base = { |
152 | .cra_name = "sha512", | 154 | .cra_name = "sha512", |
153 | .cra_driver_name= "sha512-sparc64", | 155 | .cra_driver_name= "sha512-sparc64", |
156 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, | ||
154 | .cra_flags = CRYPTO_ALG_TYPE_SHASH, | 157 | .cra_flags = CRYPTO_ALG_TYPE_SHASH, |
155 | .cra_blocksize = SHA512_BLOCK_SIZE, | 158 | .cra_blocksize = SHA512_BLOCK_SIZE, |
156 | .cra_module = THIS_MODULE, | 159 | .cra_module = THIS_MODULE, |
@@ -166,6 +169,7 @@ static struct shash_alg sha384 = { | |||
166 | .base = { | 169 | .base = { |
167 | .cra_name = "sha384", | 170 | .cra_name = "sha384", |
168 | .cra_driver_name= "sha384-sparc64", | 171 | .cra_driver_name= "sha384-sparc64", |
172 | .cra_priority = SPARC_CR_OPCODE_PRIORITY, | ||
169 | .cra_flags = CRYPTO_ALG_TYPE_SHASH, | 173 | .cra_flags = CRYPTO_ALG_TYPE_SHASH, |
170 | .cra_blocksize = SHA384_BLOCK_SIZE, | 174 | .cra_blocksize = SHA384_BLOCK_SIZE, |
171 | .cra_module = THIS_MODULE, | 175 | .cra_module = THIS_MODULE, |
diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c index a8bd0310f8fe..aab257403b4a 100644 --- a/drivers/crypto/n2_core.c +++ b/drivers/crypto/n2_core.c | |||
@@ -42,7 +42,7 @@ MODULE_DESCRIPTION("Niagara2 Crypto driver"); | |||
42 | MODULE_LICENSE("GPL"); | 42 | MODULE_LICENSE("GPL"); |
43 | MODULE_VERSION(DRV_MODULE_VERSION); | 43 | MODULE_VERSION(DRV_MODULE_VERSION); |
44 | 44 | ||
45 | #define N2_CRA_PRIORITY 300 | 45 | #define N2_CRA_PRIORITY 200 |
46 | 46 | ||
47 | static DEFINE_MUTEX(spu_lock); | 47 | static DEFINE_MUTEX(spu_lock); |
48 | 48 | ||