Skip to content

Commit 3b7464f

Browse files
author
CKI KWF Bot
committed
Merge: qcom: scm: upgrade to 6.17
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1532 JIRA: https://issues.redhat.com/browse/RHEL-117514 Upgrade qcom_scm and related drivers. Summary of the desired changes: - Wrapped key support; - Various fixes; I chose to pick the QSEECOM changes even if the configuration for that driver is disabled, because they are both simple and might be enabled some day to support UEFI services. Signed-off-by: Eric Chanudet <echanude@redhat.com> Approved-by: Lenny Szubowicz <lszubowi@redhat.com> Approved-by: Brian Masney <bmasney@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 252486e + 55e4d4b commit 3b7464f

File tree

6 files changed

+344
-51
lines changed

6 files changed

+344
-51
lines changed

drivers/firmware/qcom/qcom_qseecom_uefisecapp.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -814,15 +814,6 @@ static int qcom_uefisecapp_probe(struct auxiliary_device *aux_dev,
814814

815815
qcuefi->client = container_of(aux_dev, struct qseecom_client, aux_dev);
816816

817-
auxiliary_set_drvdata(aux_dev, qcuefi);
818-
status = qcuefi_set_reference(qcuefi);
819-
if (status)
820-
return status;
821-
822-
status = efivars_register(&qcuefi->efivars, &qcom_efivar_ops);
823-
if (status)
824-
qcuefi_set_reference(NULL);
825-
826817
memset(&pool_config, 0, sizeof(pool_config));
827818
pool_config.initial_size = SZ_4K;
828819
pool_config.policy = QCOM_TZMEM_POLICY_MULTIPLIER;
@@ -833,6 +824,15 @@ static int qcom_uefisecapp_probe(struct auxiliary_device *aux_dev,
833824
if (IS_ERR(qcuefi->mempool))
834825
return PTR_ERR(qcuefi->mempool);
835826

827+
auxiliary_set_drvdata(aux_dev, qcuefi);
828+
status = qcuefi_set_reference(qcuefi);
829+
if (status)
830+
return status;
831+
832+
status = efivars_register(&qcuefi->efivars, &qcom_efivar_ops);
833+
if (status)
834+
qcuefi_set_reference(NULL);
835+
836836
return status;
837837
}
838838

drivers/firmware/qcom/qcom_scm-smc.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ int __scm_smc_call(struct device *dev, const struct qcom_scm_desc *desc,
152152
enum qcom_scm_convention qcom_convention,
153153
struct qcom_scm_res *res, bool atomic)
154154
{
155-
struct qcom_tzmem_pool *mempool = qcom_scm_get_tzmem_pool();
156155
int arglen = desc->arginfo & 0xf;
157156
int i, ret;
158157
void *args_virt __free(qcom_tzmem) = NULL;
@@ -173,6 +172,11 @@ int __scm_smc_call(struct device *dev, const struct qcom_scm_desc *desc,
173172
smc.args[i + SCM_SMC_FIRST_REG_IDX] = desc->args[i];
174173

175174
if (unlikely(arglen > SCM_SMC_N_REG_ARGS)) {
175+
struct qcom_tzmem_pool *mempool = qcom_scm_get_tzmem_pool();
176+
177+
if (!mempool)
178+
return -EINVAL;
179+
176180
args_virt = qcom_tzmem_alloc(mempool,
177181
SCM_SMC_N_EXT_ARGS * sizeof(u64),
178182
flag);

0 commit comments

Comments
 (0)