Lines Matching refs:cpu_queue
47 struct cryptd_cpu_queue __percpu *cpu_queue; member
105 struct cryptd_cpu_queue *cpu_queue; in cryptd_init_queue() local
107 queue->cpu_queue = alloc_percpu(struct cryptd_cpu_queue); in cryptd_init_queue()
108 if (!queue->cpu_queue) in cryptd_init_queue()
111 cpu_queue = per_cpu_ptr(queue->cpu_queue, cpu); in cryptd_init_queue()
112 crypto_init_queue(&cpu_queue->queue, max_cpu_qlen); in cryptd_init_queue()
113 INIT_WORK(&cpu_queue->work, cryptd_queue_worker); in cryptd_init_queue()
114 local_lock_init(&cpu_queue->bh_lock); in cryptd_init_queue()
123 struct cryptd_cpu_queue *cpu_queue; in cryptd_fini_queue() local
126 cpu_queue = per_cpu_ptr(queue->cpu_queue, cpu); in cryptd_fini_queue()
127 BUG_ON(cpu_queue->queue.qlen); in cryptd_fini_queue()
129 free_percpu(queue->cpu_queue); in cryptd_fini_queue()
136 struct cryptd_cpu_queue *cpu_queue; in cryptd_enqueue_request() local
140 local_lock_nested_bh(&queue->cpu_queue->bh_lock); in cryptd_enqueue_request()
141 cpu_queue = this_cpu_ptr(queue->cpu_queue); in cryptd_enqueue_request()
142 err = crypto_enqueue_request(&cpu_queue->queue, request); in cryptd_enqueue_request()
149 queue_work_on(smp_processor_id(), cryptd_wq, &cpu_queue->work); in cryptd_enqueue_request()
157 local_unlock_nested_bh(&queue->cpu_queue->bh_lock); in cryptd_enqueue_request()
168 struct cryptd_cpu_queue *cpu_queue; in cryptd_queue_worker() local
171 cpu_queue = container_of(work, struct cryptd_cpu_queue, work); in cryptd_queue_worker()
176 __local_lock_nested_bh(&cpu_queue->bh_lock); in cryptd_queue_worker()
177 backlog = crypto_get_backlog(&cpu_queue->queue); in cryptd_queue_worker()
178 req = crypto_dequeue_request(&cpu_queue->queue); in cryptd_queue_worker()
179 __local_unlock_nested_bh(&cpu_queue->bh_lock); in cryptd_queue_worker()
189 if (cpu_queue->queue.qlen) in cryptd_queue_worker()
190 queue_work(cryptd_wq, &cpu_queue->work); in cryptd_queue_worker()