Lines Matching refs:acomp_ctx
167 struct crypto_acomp_ctx __percpu *acomp_ctx;
492 struct crypto_acomp_ctx *acomp_ctx = per_cpu_ptr(pool->acomp_ctx, cpu);
502 acomp_ctx->acomp = acomp;
504 req = acomp_request_alloc(acomp_ctx->acomp);
508 crypto_free_acomp(acomp_ctx->acomp);
511 acomp_ctx->req = req;
513 crypto_init_wait(&acomp_ctx->wait);
520 crypto_req_done, &acomp_ctx->wait);
522 acomp_ctx->mutex = per_cpu(zswap_mutex, cpu);
523 acomp_ctx->dstmem = per_cpu(zswap_dstmem, cpu);
531 struct crypto_acomp_ctx *acomp_ctx = per_cpu_ptr(pool->acomp_ctx, cpu);
533 if (!IS_ERR_OR_NULL(acomp_ctx)) {
534 if (!IS_ERR_OR_NULL(acomp_ctx->req))
535 acomp_request_free(acomp_ctx->req);
536 if (!IS_ERR_OR_NULL(acomp_ctx->acomp))
537 crypto_free_acomp(acomp_ctx->acomp);
750 pool->acomp_ctx = alloc_percpu(*pool->acomp_ctx);
751 if (!pool->acomp_ctx) {
776 if (pool->acomp_ctx)
777 free_percpu(pool->acomp_ctx);
833 free_percpu(pool->acomp_ctx);
1061 struct crypto_acomp_ctx *acomp_ctx;
1111 acomp_ctx = raw_cpu_ptr(entry->pool->acomp_ctx);
1121 mutex_lock(acomp_ctx->mutex);
1125 acomp_request_set_params(acomp_ctx->req, &input, &output, entry->length, dlen);
1126 ret = crypto_wait_req(crypto_acomp_decompress(acomp_ctx->req), &acomp_ctx->wait);
1127 dlen = acomp_ctx->req->dlen;
1128 mutex_unlock(acomp_ctx->mutex);
1202 struct crypto_acomp_ctx *acomp_ctx;
1291 acomp_ctx = raw_cpu_ptr(entry->pool->acomp_ctx);
1293 mutex_lock(acomp_ctx->mutex);
1295 dst = acomp_ctx->dstmem;
1301 acomp_request_set_params(acomp_ctx->req, &input, &output, PAGE_SIZE, dlen);
1314 ret = crypto_wait_req(crypto_acomp_compress(acomp_ctx->req), &acomp_ctx->wait);
1315 dlen = acomp_ctx->req->dlen;
1337 mutex_unlock(acomp_ctx->mutex);
1380 mutex_unlock(acomp_ctx->mutex);
1405 struct crypto_acomp_ctx *acomp_ctx;
1449 acomp_ctx = raw_cpu_ptr(entry->pool->acomp_ctx);
1450 mutex_lock(acomp_ctx->mutex);
1454 acomp_request_set_params(acomp_ctx->req, &input, &output, entry->length, dlen);
1455 if (crypto_wait_req(crypto_acomp_decompress(acomp_ctx->req), &acomp_ctx->wait))
1457 mutex_unlock(acomp_ctx->mutex);