Lines Matching refs:msg

289 	struct hpre_sqe *msg = &hpre_req->req;  in hpre_hw_data_init()  local
305 msg->in = cpu_to_le64(tmp); in hpre_hw_data_init()
307 msg->out = cpu_to_le64(tmp); in hpre_hw_data_init()
517 struct hpre_sqe *msg; in hpre_msg_request_set() local
533 msg = &h_req->req; in hpre_msg_request_set()
534 memset(msg, 0, sizeof(*msg)); in hpre_msg_request_set()
547 msg = &h_req->req; in hpre_msg_request_set()
548 memset(msg, 0, sizeof(*msg)); in hpre_msg_request_set()
549 msg->key = cpu_to_le64(ctx->dh.dma_xa_p); in hpre_msg_request_set()
552 msg->in = cpu_to_le64(DMA_MAPPING_ERROR); in hpre_msg_request_set()
553 msg->out = cpu_to_le64(DMA_MAPPING_ERROR); in hpre_msg_request_set()
554 msg->dw0 |= cpu_to_le32(0x1 << HPRE_SQE_DONE_SHIFT); in hpre_msg_request_set()
555 msg->task_len1 = (ctx->key_sz >> HPRE_BITS_2_BYTES_SHIFT) - 1; in hpre_msg_request_set()
562 msg->tag = cpu_to_le16((u16)req_id); in hpre_msg_request_set()
567 static int hpre_send(struct hpre_ctx *ctx, struct hpre_sqe *msg) in hpre_send() argument
575 ret = hisi_qp_send(ctx->qp, msg); in hpre_send()
596 struct hpre_sqe *msg = &hpre_req->req; in hpre_dh_compute_value() local
608 msg->in = cpu_to_le64(ctx->dh.dma_g); in hpre_dh_compute_value()
616 msg->dw0 = cpu_to_le32(le32_to_cpu(msg->dw0) | HPRE_ALG_DH_G2); in hpre_dh_compute_value()
618 msg->dw0 = cpu_to_le32(le32_to_cpu(msg->dw0) | HPRE_ALG_DH); in hpre_dh_compute_value()
621 ret = hpre_send(ctx, msg); in hpre_dh_compute_value()
799 struct hpre_sqe *msg = &hpre_req->req; in hpre_rsa_enc() local
818 msg->dw0 |= cpu_to_le32(HPRE_ALG_NC_NCRT); in hpre_rsa_enc()
819 msg->key = cpu_to_le64(ctx->rsa.dma_pubkey); in hpre_rsa_enc()
830 ret = hpre_send(ctx, msg); in hpre_rsa_enc()
847 struct hpre_sqe *msg = &hpre_req->req; in hpre_rsa_dec() local
867 msg->key = cpu_to_le64(ctx->rsa.dma_crt_prikey); in hpre_rsa_dec()
868 msg->dw0 = cpu_to_le32(le32_to_cpu(msg->dw0) | in hpre_rsa_dec()
871 msg->key = cpu_to_le64(ctx->rsa.dma_prikey); in hpre_rsa_dec()
872 msg->dw0 = cpu_to_le32(le32_to_cpu(msg->dw0) | in hpre_rsa_dec()
885 ret = hpre_send(ctx, msg); in hpre_rsa_dec()
1499 struct hpre_sqe *msg; in hpre_ecdh_msg_request_set() local
1512 msg = &h_req->req; in hpre_ecdh_msg_request_set()
1513 memset(msg, 0, sizeof(*msg)); in hpre_ecdh_msg_request_set()
1514 msg->in = cpu_to_le64(DMA_MAPPING_ERROR); in hpre_ecdh_msg_request_set()
1515 msg->out = cpu_to_le64(DMA_MAPPING_ERROR); in hpre_ecdh_msg_request_set()
1516 msg->key = cpu_to_le64(ctx->ecdh.dma_p); in hpre_ecdh_msg_request_set()
1518 msg->dw0 |= cpu_to_le32(0x1U << HPRE_SQE_DONE_SHIFT); in hpre_ecdh_msg_request_set()
1519 msg->task_len1 = (ctx->key_sz >> HPRE_BITS_2_BYTES_SHIFT) - 1; in hpre_ecdh_msg_request_set()
1526 msg->tag = cpu_to_le16((u16)req_id); in hpre_ecdh_msg_request_set()
1533 struct hpre_sqe *msg = &hpre_req->req; in hpre_ecdh_src_data_init() local
1556 msg->in = cpu_to_le64(dma); in hpre_ecdh_src_data_init()
1563 struct hpre_sqe *msg = &hpre_req->req; in hpre_ecdh_dst_data_init() local
1580 msg->out = cpu_to_le64(dma); in hpre_ecdh_dst_data_init()
1591 struct hpre_sqe *msg = &hpre_req->req; in hpre_ecdh_compute_value() local
1607 msg->in = cpu_to_le64(ctx->ecdh.dma_g); in hpre_ecdh_compute_value()
1616 msg->dw0 = cpu_to_le32(le32_to_cpu(msg->dw0) | HPRE_ALG_ECC_MUL); in hpre_ecdh_compute_value()
1617 ret = hpre_send(ctx, msg); in hpre_ecdh_compute_value()
1811 struct hpre_sqe *msg; in hpre_curve25519_msg_request_set() local
1824 msg = &h_req->req; in hpre_curve25519_msg_request_set()
1825 memset(msg, 0, sizeof(*msg)); in hpre_curve25519_msg_request_set()
1826 msg->in = cpu_to_le64(DMA_MAPPING_ERROR); in hpre_curve25519_msg_request_set()
1827 msg->out = cpu_to_le64(DMA_MAPPING_ERROR); in hpre_curve25519_msg_request_set()
1828 msg->key = cpu_to_le64(ctx->curve25519.dma_p); in hpre_curve25519_msg_request_set()
1830 msg->dw0 |= cpu_to_le32(0x1U << HPRE_SQE_DONE_SHIFT); in hpre_curve25519_msg_request_set()
1831 msg->task_len1 = (ctx->key_sz >> HPRE_BITS_2_BYTES_SHIFT) - 1; in hpre_curve25519_msg_request_set()
1838 msg->tag = cpu_to_le16((u16)req_id); in hpre_curve25519_msg_request_set()
1856 struct hpre_sqe *msg = &hpre_req->req; in hpre_curve25519_src_init() local
1904 msg->in = cpu_to_le64(dma); in hpre_curve25519_src_init()
1915 struct hpre_sqe *msg = &hpre_req->req; in hpre_curve25519_dst_init() local
1932 msg->out = cpu_to_le64(dma); in hpre_curve25519_dst_init()
1943 struct hpre_sqe *msg = &hpre_req->req; in hpre_curve25519_compute_value() local
1960 msg->in = cpu_to_le64(ctx->curve25519.dma_g); in hpre_curve25519_compute_value()
1969 msg->dw0 = cpu_to_le32(le32_to_cpu(msg->dw0) | HPRE_ALG_CURVE25519_MUL); in hpre_curve25519_compute_value()
1970 ret = hpre_send(ctx, msg); in hpre_curve25519_compute_value()