Commit 0b44f4861f4cc1089424821f078d38441f8b4983
Committed by
Tejun Heo
1 parent
7a9e02d6bb
Exists in
master
and in
20 other branches
this_cpu: Use this_cpu_ptr in crypto subsystem
Just a slight optimization that removes one array lookup. The processor number is needed for other things as well so the get/put_cpu cannot be removed. Acked-by: Tejun Heo <tj@kernel.org> Cc: Huang Ying <ying.huang@intel.com> Signed-off-by: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: Tejun Heo <tj@kernel.org>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
crypto/cryptd.c
... | ... | @@ -99,7 +99,7 @@ |
99 | 99 | struct cryptd_cpu_queue *cpu_queue; |
100 | 100 | |
101 | 101 | cpu = get_cpu(); |
102 | - cpu_queue = per_cpu_ptr(queue->cpu_queue, cpu); | |
102 | + cpu_queue = this_cpu_ptr(queue->cpu_queue); | |
103 | 103 | err = crypto_enqueue_request(&cpu_queue->queue, request); |
104 | 104 | queue_work_on(cpu, kcrypto_wq, &cpu_queue->work); |
105 | 105 | put_cpu(); |