diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-23 19:18:25 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-23 19:18:25 -0500 |
| commit | 26b265cd29dde56bf0901c421eabc7ae815f38c4 (patch) | |
| tree | 83a5418c96ccde8522bda6614063b665fe5e0ec9 /kernel | |
| parent | 2e7babfa892a55588467ef03b545002e32f31528 (diff) | |
| parent | f262f0f5cad0c9eca61d1d383e3b67b57dcbe5ea (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto update from Herbert Xu:
- Made x86 ablk_helper generic for ARM
- Phase out chainiv in favour of eseqiv (affects IPsec)
- Fixed aes-cbc IV corruption on s390
- Added constant-time crypto_memneq which replaces memcmp
- Fixed aes-ctr in omap-aes
- Added OMAP3 ROM RNG support
- Add PRNG support for MSM SoC's
- Add and use Job Ring API in caam
- Misc fixes
[ NOTE! This pull request was sent within the merge window, but Herbert
has some questionable email sending setup that makes him public enemy
#1 as far as gmail is concerned. So most of his emails seem to be
trapped by gmail as spam, resulting in me not seeing them. - Linus ]
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (49 commits)
crypto: s390 - Fix aes-cbc IV corruption
crypto: omap-aes - Fix CTR mode counter length
crypto: omap-sham - Add missing modalias
padata: make the sequence counter an atomic_t
crypto: caam - Modify the interface layers to use JR API's
crypto: caam - Add API's to allocate/free Job Rings
crypto: caam - Add Platform driver for Job Ring
hwrng: msm - Add PRNG support for MSM SoC's
ARM: DT: msm: Add Qualcomm's PRNG driver binding document
crypto: skcipher - Use eseqiv even on UP machines
crypto: talitos - Simplify key parsing
crypto: picoxcell - Simplify and harden key parsing
crypto: ixp4xx - Simplify and harden key parsing
crypto: authencesn - Simplify key parsing
crypto: authenc - Export key parsing helper function
crypto: mv_cesa: remove deprecated IRQF_DISABLED
hwrng: OMAP3 ROM Random Number Generator support
crypto: sha256_ssse3 - also test for BMI2
crypto: mv_cesa - Remove redundant of_match_ptr
crypto: sahara - Remove redundant of_match_ptr
...
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/padata.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/kernel/padata.c b/kernel/padata.c index 07af2c95dcfe..2abd25d79cc8 100644 --- a/kernel/padata.c +++ b/kernel/padata.c | |||
| @@ -46,6 +46,7 @@ static int padata_index_to_cpu(struct parallel_data *pd, int cpu_index) | |||
| 46 | 46 | ||
| 47 | static int padata_cpu_hash(struct parallel_data *pd) | 47 | static int padata_cpu_hash(struct parallel_data *pd) |
| 48 | { | 48 | { |
| 49 | unsigned int seq_nr; | ||
| 49 | int cpu_index; | 50 | int cpu_index; |
| 50 | 51 | ||
| 51 | /* | 52 | /* |
| @@ -53,10 +54,8 @@ static int padata_cpu_hash(struct parallel_data *pd) | |||
| 53 | * seq_nr mod. number of cpus in use. | 54 | * seq_nr mod. number of cpus in use. |
| 54 | */ | 55 | */ |
| 55 | 56 | ||
| 56 | spin_lock(&pd->seq_lock); | 57 | seq_nr = atomic_inc_return(&pd->seq_nr); |
| 57 | cpu_index = pd->seq_nr % cpumask_weight(pd->cpumask.pcpu); | 58 | cpu_index = seq_nr % cpumask_weight(pd->cpumask.pcpu); |
| 58 | pd->seq_nr++; | ||
| 59 | spin_unlock(&pd->seq_lock); | ||
| 60 | 59 | ||
| 61 | return padata_index_to_cpu(pd, cpu_index); | 60 | return padata_index_to_cpu(pd, cpu_index); |
| 62 | } | 61 | } |
| @@ -429,7 +428,7 @@ static struct parallel_data *padata_alloc_pd(struct padata_instance *pinst, | |||
| 429 | padata_init_pqueues(pd); | 428 | padata_init_pqueues(pd); |
| 430 | padata_init_squeues(pd); | 429 | padata_init_squeues(pd); |
| 431 | setup_timer(&pd->timer, padata_reorder_timer, (unsigned long)pd); | 430 | setup_timer(&pd->timer, padata_reorder_timer, (unsigned long)pd); |
| 432 | pd->seq_nr = 0; | 431 | atomic_set(&pd->seq_nr, -1); |
| 433 | atomic_set(&pd->reorder_objects, 0); | 432 | atomic_set(&pd->reorder_objects, 0); |
| 434 | atomic_set(&pd->refcnt, 0); | 433 | atomic_set(&pd->refcnt, 0); |
| 435 | pd->pinst = pinst; | 434 | pd->pinst = pinst; |
