diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-17 12:24:04 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-17 12:24:04 -0400 |
commit | ac1d426e825ab5778995f2f6f053ca2e6b45c622 (patch) | |
tree | 75b91356ca39463e0112931aa6790802fb1e07a2 /crypto | |
parent | fda0e18c8a7a3e02747c2b045b4fcd2c920410b9 (diff) | |
parent | a3685f00652af83f12b63e3b4ef48f29581ba48b (diff) |
Merge branch 'devel-stable' into devel
Conflicts:
arch/arm/Kconfig
arch/arm/include/asm/system.h
arch/arm/mm/Kconfig
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/algapi.c | 1 | ||||
-rw-r--r-- | crypto/algboss.c | 1 | ||||
-rw-r--r-- | crypto/async_tx/async_pq.c | 1 | ||||
-rw-r--r-- | crypto/async_tx/async_raid6_recov.c | 21 | ||||
-rw-r--r-- | crypto/async_tx/raid6test.c | 1 | ||||
-rw-r--r-- | crypto/authenc.c | 16 | ||||
-rw-r--r-- | crypto/hmac.c | 1 | ||||
-rw-r--r-- | crypto/rng.c | 1 | ||||
-rw-r--r-- | crypto/seqiv.c | 1 | ||||
-rw-r--r-- | crypto/tcrypt.c | 2 | ||||
-rw-r--r-- | crypto/xor.c | 1 |
11 files changed, 32 insertions, 15 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index 3e4524e6139b..76fae27ed01c 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/rtnetlink.h> | 19 | #include <linux/rtnetlink.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/string.h> | 21 | #include <linux/string.h> |
21 | 22 | ||
22 | #include "internal.h" | 23 | #include "internal.h" |
diff --git a/crypto/algboss.c b/crypto/algboss.c index 412241ce4cfa..c3c196b5823a 100644 --- a/crypto/algboss.c +++ b/crypto/algboss.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/notifier.h> | 19 | #include <linux/notifier.h> |
20 | #include <linux/rtnetlink.h> | 20 | #include <linux/rtnetlink.h> |
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/string.h> | 23 | #include <linux/string.h> |
23 | 24 | ||
24 | #include "internal.h" | 25 | #include "internal.h" |
diff --git a/crypto/async_tx/async_pq.c b/crypto/async_tx/async_pq.c index ec87f53d5059..fdd8257d35d9 100644 --- a/crypto/async_tx/async_pq.c +++ b/crypto/async_tx/async_pq.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/dma-mapping.h> | 24 | #include <linux/dma-mapping.h> |
25 | #include <linux/raid/pq.h> | 25 | #include <linux/raid/pq.h> |
26 | #include <linux/async_tx.h> | 26 | #include <linux/async_tx.h> |
27 | #include <linux/gfp.h> | ||
27 | 28 | ||
28 | /** | 29 | /** |
29 | * pq_scribble_page - space to hold throwaway P or Q buffer for | 30 | * pq_scribble_page - space to hold throwaway P or Q buffer for |
diff --git a/crypto/async_tx/async_raid6_recov.c b/crypto/async_tx/async_raid6_recov.c index 943f2abac9b4..ce038d861eb9 100644 --- a/crypto/async_tx/async_raid6_recov.c +++ b/crypto/async_tx/async_raid6_recov.c | |||
@@ -324,6 +324,7 @@ struct dma_async_tx_descriptor * | |||
324 | async_raid6_2data_recov(int disks, size_t bytes, int faila, int failb, | 324 | async_raid6_2data_recov(int disks, size_t bytes, int faila, int failb, |
325 | struct page **blocks, struct async_submit_ctl *submit) | 325 | struct page **blocks, struct async_submit_ctl *submit) |
326 | { | 326 | { |
327 | void *scribble = submit->scribble; | ||
327 | int non_zero_srcs, i; | 328 | int non_zero_srcs, i; |
328 | 329 | ||
329 | BUG_ON(faila == failb); | 330 | BUG_ON(faila == failb); |
@@ -332,11 +333,13 @@ async_raid6_2data_recov(int disks, size_t bytes, int faila, int failb, | |||
332 | 333 | ||
333 | pr_debug("%s: disks: %d len: %zu\n", __func__, disks, bytes); | 334 | pr_debug("%s: disks: %d len: %zu\n", __func__, disks, bytes); |
334 | 335 | ||
335 | /* we need to preserve the contents of 'blocks' for the async | 336 | /* if a dma resource is not available or a scribble buffer is not |
336 | * case, so punt to synchronous if a scribble buffer is not available | 337 | * available punt to the synchronous path. In the 'dma not |
338 | * available' case be sure to use the scribble buffer to | ||
339 | * preserve the content of 'blocks' as the caller intended. | ||
337 | */ | 340 | */ |
338 | if (!submit->scribble) { | 341 | if (!async_dma_find_channel(DMA_PQ) || !scribble) { |
339 | void **ptrs = (void **) blocks; | 342 | void **ptrs = scribble ? scribble : (void **) blocks; |
340 | 343 | ||
341 | async_tx_quiesce(&submit->depend_tx); | 344 | async_tx_quiesce(&submit->depend_tx); |
342 | for (i = 0; i < disks; i++) | 345 | for (i = 0; i < disks; i++) |
@@ -406,11 +409,13 @@ async_raid6_datap_recov(int disks, size_t bytes, int faila, | |||
406 | 409 | ||
407 | pr_debug("%s: disks: %d len: %zu\n", __func__, disks, bytes); | 410 | pr_debug("%s: disks: %d len: %zu\n", __func__, disks, bytes); |
408 | 411 | ||
409 | /* we need to preserve the contents of 'blocks' for the async | 412 | /* if a dma resource is not available or a scribble buffer is not |
410 | * case, so punt to synchronous if a scribble buffer is not available | 413 | * available punt to the synchronous path. In the 'dma not |
414 | * available' case be sure to use the scribble buffer to | ||
415 | * preserve the content of 'blocks' as the caller intended. | ||
411 | */ | 416 | */ |
412 | if (!scribble) { | 417 | if (!async_dma_find_channel(DMA_PQ) || !scribble) { |
413 | void **ptrs = (void **) blocks; | 418 | void **ptrs = scribble ? scribble : (void **) blocks; |
414 | 419 | ||
415 | async_tx_quiesce(&submit->depend_tx); | 420 | async_tx_quiesce(&submit->depend_tx); |
416 | for (i = 0; i < disks; i++) | 421 | for (i = 0; i < disks; i++) |
diff --git a/crypto/async_tx/raid6test.c b/crypto/async_tx/raid6test.c index f84f6b4301d9..c1321935ebcc 100644 --- a/crypto/async_tx/raid6test.c +++ b/crypto/async_tx/raid6test.c | |||
@@ -20,6 +20,7 @@ | |||
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | #include <linux/async_tx.h> | 22 | #include <linux/async_tx.h> |
23 | #include <linux/gfp.h> | ||
23 | #include <linux/random.h> | 24 | #include <linux/random.h> |
24 | 25 | ||
25 | #undef pr | 26 | #undef pr |
diff --git a/crypto/authenc.c b/crypto/authenc.c index 2bb7348d8d55..05eb32e0d949 100644 --- a/crypto/authenc.c +++ b/crypto/authenc.c | |||
@@ -46,6 +46,12 @@ struct authenc_request_ctx { | |||
46 | char tail[]; | 46 | char tail[]; |
47 | }; | 47 | }; |
48 | 48 | ||
49 | static void authenc_request_complete(struct aead_request *req, int err) | ||
50 | { | ||
51 | if (err != -EINPROGRESS) | ||
52 | aead_request_complete(req, err); | ||
53 | } | ||
54 | |||
49 | static int crypto_authenc_setkey(struct crypto_aead *authenc, const u8 *key, | 55 | static int crypto_authenc_setkey(struct crypto_aead *authenc, const u8 *key, |
50 | unsigned int keylen) | 56 | unsigned int keylen) |
51 | { | 57 | { |
@@ -142,7 +148,7 @@ static void authenc_geniv_ahash_update_done(struct crypto_async_request *areq, | |||
142 | crypto_aead_authsize(authenc), 1); | 148 | crypto_aead_authsize(authenc), 1); |
143 | 149 | ||
144 | out: | 150 | out: |
145 | aead_request_complete(req, err); | 151 | authenc_request_complete(req, err); |
146 | } | 152 | } |
147 | 153 | ||
148 | static void authenc_geniv_ahash_done(struct crypto_async_request *areq, int err) | 154 | static void authenc_geniv_ahash_done(struct crypto_async_request *areq, int err) |
@@ -208,7 +214,7 @@ static void authenc_verify_ahash_update_done(struct crypto_async_request *areq, | |||
208 | err = crypto_ablkcipher_decrypt(abreq); | 214 | err = crypto_ablkcipher_decrypt(abreq); |
209 | 215 | ||
210 | out: | 216 | out: |
211 | aead_request_complete(req, err); | 217 | authenc_request_complete(req, err); |
212 | } | 218 | } |
213 | 219 | ||
214 | static void authenc_verify_ahash_done(struct crypto_async_request *areq, | 220 | static void authenc_verify_ahash_done(struct crypto_async_request *areq, |
@@ -245,7 +251,7 @@ static void authenc_verify_ahash_done(struct crypto_async_request *areq, | |||
245 | err = crypto_ablkcipher_decrypt(abreq); | 251 | err = crypto_ablkcipher_decrypt(abreq); |
246 | 252 | ||
247 | out: | 253 | out: |
248 | aead_request_complete(req, err); | 254 | authenc_request_complete(req, err); |
249 | } | 255 | } |
250 | 256 | ||
251 | static u8 *crypto_authenc_ahash_fb(struct aead_request *req, unsigned int flags) | 257 | static u8 *crypto_authenc_ahash_fb(struct aead_request *req, unsigned int flags) |
@@ -379,7 +385,7 @@ static void crypto_authenc_encrypt_done(struct crypto_async_request *req, | |||
379 | err = crypto_authenc_genicv(areq, iv, 0); | 385 | err = crypto_authenc_genicv(areq, iv, 0); |
380 | } | 386 | } |
381 | 387 | ||
382 | aead_request_complete(areq, err); | 388 | authenc_request_complete(areq, err); |
383 | } | 389 | } |
384 | 390 | ||
385 | static int crypto_authenc_encrypt(struct aead_request *req) | 391 | static int crypto_authenc_encrypt(struct aead_request *req) |
@@ -420,7 +426,7 @@ static void crypto_authenc_givencrypt_done(struct crypto_async_request *req, | |||
420 | err = crypto_authenc_genicv(areq, greq->giv, 0); | 426 | err = crypto_authenc_genicv(areq, greq->giv, 0); |
421 | } | 427 | } |
422 | 428 | ||
423 | aead_request_complete(areq, err); | 429 | authenc_request_complete(areq, err); |
424 | } | 430 | } |
425 | 431 | ||
426 | static int crypto_authenc_givencrypt(struct aead_givcrypt_request *req) | 432 | static int crypto_authenc_givencrypt(struct aead_givcrypt_request *req) |
diff --git a/crypto/hmac.c b/crypto/hmac.c index 15c2eb534541..8d9544cf8169 100644 --- a/crypto/hmac.c +++ b/crypto/hmac.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/scatterlist.h> | 25 | #include <linux/scatterlist.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/string.h> | 26 | #include <linux/string.h> |
28 | 27 | ||
29 | struct hmac_ctx { | 28 | struct hmac_ctx { |
diff --git a/crypto/rng.c b/crypto/rng.c index ba05e7380e76..f93cb5311182 100644 --- a/crypto/rng.c +++ b/crypto/rng.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mutex.h> | 19 | #include <linux/mutex.h> |
20 | #include <linux/random.h> | 20 | #include <linux/random.h> |
21 | #include <linux/seq_file.h> | 21 | #include <linux/seq_file.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/string.h> | 23 | #include <linux/string.h> |
23 | 24 | ||
24 | static DEFINE_MUTEX(crypto_default_rng_lock); | 25 | static DEFINE_MUTEX(crypto_default_rng_lock); |
diff --git a/crypto/seqiv.c b/crypto/seqiv.c index 5a013a8bf87a..4c4491229417 100644 --- a/crypto/seqiv.c +++ b/crypto/seqiv.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
24 | #include <linux/string.h> | 25 | #include <linux/string.h> |
25 | 26 | ||
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index aa3f84ccc786..a35159947a26 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c | |||
@@ -18,8 +18,8 @@ | |||
18 | #include <crypto/hash.h> | 18 | #include <crypto/hash.h> |
19 | #include <linux/err.h> | 19 | #include <linux/err.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/gfp.h> | ||
21 | #include <linux/module.h> | 22 | #include <linux/module.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/scatterlist.h> | 23 | #include <linux/scatterlist.h> |
24 | #include <linux/string.h> | 24 | #include <linux/string.h> |
25 | #include <linux/moduleparam.h> | 25 | #include <linux/moduleparam.h> |
diff --git a/crypto/xor.c b/crypto/xor.c index fc5b836f3430..b75182d8ab14 100644 --- a/crypto/xor.c +++ b/crypto/xor.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #define BH_TRACE 0 | 19 | #define BH_TRACE 0 |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/gfp.h> | ||
21 | #include <linux/raid/xor.h> | 22 | #include <linux/raid/xor.h> |
22 | #include <linux/jiffies.h> | 23 | #include <linux/jiffies.h> |
23 | #include <asm/xor.h> | 24 | #include <asm/xor.h> |