Skip to content

Commit

Permalink
crypto: qat - add local memory size to chip info
Browse files Browse the repository at this point in the history
Add the local memory size to the chip info since the size of this memory
will be different in the next generation of QAT devices.

Signed-off-by: Jack Xu <[email protected]>
Co-developed-by: Wojciech Ziemba <[email protected]>
Signed-off-by: Wojciech Ziemba <[email protected]>
Reviewed-by: Giovanni Cabiddu <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
jxu75 authored and herbertx committed Nov 13, 2020
1 parent 8b487ae commit 4f07195
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions drivers/crypto/qat/qat_common/icp_qat_fw_loader_handle.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ struct icp_qat_fw_loader_chip_info {
bool sram_visible;
bool nn;
bool lm2lm3;
u32 lm_size;
bool fw_auth;
};

Expand Down
2 changes: 2 additions & 0 deletions drivers/crypto/qat/qat_common/qat_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,12 +699,14 @@ static int qat_hal_chip_init(struct icp_qat_fw_loader_handle *handle,
handle->chip_info->sram_visible = false;
handle->chip_info->nn = true;
handle->chip_info->lm2lm3 = false;
handle->chip_info->lm_size = ICP_QAT_UCLO_MAX_LMEM_REG;
handle->chip_info->fw_auth = true;
break;
case PCI_DEVICE_ID_INTEL_QAT_DH895XCC:
handle->chip_info->sram_visible = true;
handle->chip_info->nn = true;
handle->chip_info->lm2lm3 = false;
handle->chip_info->lm_size = ICP_QAT_UCLO_MAX_LMEM_REG;
handle->chip_info->fw_auth = false;
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion drivers/crypto/qat/qat_common/qat_uclo.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ static int qat_uclo_init_lmem_seg(struct icp_qat_fw_loader_handle *handle,
unsigned int ae;

if (qat_uclo_fetch_initmem_ae(handle, init_mem,
ICP_QAT_UCLO_MAX_LMEM_REG, &ae))
handle->chip_info->lm_size, &ae))
return -EINVAL;
if (qat_uclo_create_batch_init_list(handle, init_mem, ae,
&obj_handle->lm_init_tab[ae]))
Expand Down

0 comments on commit 4f07195

Please sign in to comment.