diff options
author | Wenkai Lin <linwenkai6@hisilicon.com> | 2023-12-02 17:17:18 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-25 15:44:42 -0800 |
commit | b83aae9e22a32d9095149919ccdbbb01c99bc34d (patch) | |
tree | 608cc7268b39c076a3cd52d0a29df8eadebdd0c6 /include | |
parent | 615245a08f04c8d3c7a8bcf22aff55166b8bca4d (diff) | |
download | linux-stable-b83aae9e22a32d9095149919ccdbbb01c99bc34d.tar.gz linux-stable-b83aae9e22a32d9095149919ccdbbb01c99bc34d.tar.bz2 linux-stable-b83aae9e22a32d9095149919ccdbbb01c99bc34d.zip |
crypto: hisilicon/qm - add a function to set qm algs
[ Upstream commit f76f0d7f20672611974d3cc705996751fc403734 ]
Extract a public function to set qm algs and remove
the similar code for setting qm algs in each module.
Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com>
Signed-off-by: Hao Fang <fanghao11@huawei.com>
Signed-off-by: Zhiqi Song <songzhiqi1@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Stable-dep-of: cf8b5156bbc8 ("crypto: hisilicon/hpre - save capability registers in probe process")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hisi_acc_qm.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/hisi_acc_qm.h b/include/linux/hisi_acc_qm.h index b8da977711a7..4c5611d99c42 100644 --- a/include/linux/hisi_acc_qm.h +++ b/include/linux/hisi_acc_qm.h @@ -160,6 +160,11 @@ enum qm_cap_bits { QM_SUPPORT_RPM, }; +struct qm_dev_alg { + u64 alg_msk; + const char *alg; +}; + struct dfx_diff_registers { u32 *regs; u32 reg_offset; @@ -375,7 +380,6 @@ struct hisi_qm { struct work_struct rst_work; struct work_struct cmd_process; - const char *algs; bool use_sva; resource_size_t phys_base; @@ -575,6 +579,8 @@ void hisi_qm_regs_dump(struct seq_file *s, struct debugfs_regset32 *regset); u32 hisi_qm_get_hw_info(struct hisi_qm *qm, const struct hisi_qm_cap_info *info_table, u32 index, bool is_read); +int hisi_qm_set_algs(struct hisi_qm *qm, u64 alg_msk, const struct qm_dev_alg *dev_algs, + u32 dev_algs_size); /* Used by VFIO ACC live migration driver */ struct pci_driver *hisi_sec_get_pf_driver(void); |