Lines Matching defs:crc

604 	wait_queue_head_t go;                     /* start crc update */
605 wait_queue_head_t done; /* crc update done */
712 struct crc_data *crc = NULL;
739 crc = kzalloc(sizeof(*crc), GFP_KERNEL);
740 if (!crc) {
741 pr_err("Failed to allocate crc\n");
774 init_waitqueue_head(&crc->go);
775 init_waitqueue_head(&crc->done);
778 crc->crc32 = &handle->crc32;
780 crc->unc[thr] = data[thr].unc;
781 crc->unc_len[thr] = &data[thr].unc_len;
784 crc->thr = kthread_run(crc32_threadfn, crc, "image_crc32");
785 if (IS_ERR(crc->thr)) {
786 crc->thr = NULL;
836 crc->run_threads = thr;
837 atomic_set_release(&crc->ready, 1);
838 wake_up(&crc->go);
881 wait_event(crc->done, atomic_read_acquire(&crc->stop));
882 atomic_set(&crc->stop, 0);
898 if (crc) {
899 if (crc->thr)
900 kthread_stop(crc->thr);
901 kfree(crc);
1221 struct crc_data *crc = NULL;
1246 crc = kzalloc(sizeof(*crc), GFP_KERNEL);
1247 if (!crc) {
1248 pr_err("Failed to allocate crc\n");
1283 init_waitqueue_head(&crc->go);
1284 init_waitqueue_head(&crc->done);
1287 crc->crc32 = &handle->crc32;
1289 crc->unc[thr] = data[thr].unc;
1290 crc->unc_len[thr] = &data[thr].unc_len;
1293 crc->thr = kthread_run(crc32_threadfn, crc, "image_crc32");
1294 if (IS_ERR(crc->thr)) {
1295 crc->thr = NULL;
1382 if (crc->run_threads) {
1383 wait_event(crc->done, atomic_read_acquire(&crc->stop));
1384 atomic_set(&crc->stop, 0);
1385 crc->run_threads = 0;
1468 crc->run_threads = thr + 1;
1469 atomic_set_release(&crc->ready, 1);
1470 wake_up(&crc->go);
1476 crc->run_threads = thr;
1477 atomic_set_release(&crc->ready, 1);
1478 wake_up(&crc->go);
1482 if (crc->run_threads) {
1483 wait_event(crc->done, atomic_read_acquire(&crc->stop));
1484 atomic_set(&crc->stop, 0);
1506 if (crc) {
1507 if (crc->thr)
1508 kthread_stop(crc->thr);
1509 kfree(crc);