Skip to content

Commit 4083df0

Browse files
committed
Merge: qcom: scm: upgrade to 6.17
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7403 JIRA: https://issues.redhat.com/browse/RHEL-117508 QCOM_SCM and dependents are only ~~enabled~~ handled in the automotive configuration. Upgrade qcom_scm and related drivers. Summary of the desired changes: - Wrapped key support; - Switch devm_clk_get to devm_clk_get_optional; - 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. Note for main-automotive: As the branch carries downstream changes, merging this MR in the downstream branch will trigger conflicts. These will be attended at that time. Signed-off-by: Eric Chanudet <echanude@redhat.com> Approved-by: Jared Kangas <jkangas@redhat.com> Approved-by: Mark Langsdorf <mlangsdo@redhat.com> Approved-by: Brian Masney <bmasney@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Patrick Talbert <ptalbert@redhat.com>
2 parents f2ccfbf + 58d99e9 commit 4083df0

File tree

7 files changed

+386
-155
lines changed

7 files changed

+386
-155
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-legacy.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ static void __scm_legacy_do(const struct arm_smccc_args *smc,
120120
/**
121121
* scm_legacy_call() - Sends a command to the SCM and waits for the command to
122122
* finish processing.
123+
* @dev: device
124+
* @desc: descriptor structure containing arguments and return values
125+
* @res: results from SMC call
123126
*
124127
* A note on cache maintenance:
125128
* Note that any buffers that are expected to be accessed by the secure world
@@ -211,6 +214,7 @@ int scm_legacy_call(struct device *dev, const struct qcom_scm_desc *desc,
211214
/**
212215
* scm_legacy_call_atomic() - Send an atomic SCM command with up to 5 arguments
213216
* and 3 return values
217+
* @unused: device, legacy argument, not used, can be NULL
214218
* @desc: SCM call descriptor containing arguments
215219
* @res: SCM call return values
216220
*

drivers/firmware/qcom/qcom_scm-smc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ int scm_get_wq_ctx(u32 *wq_ctx, u32 *flags, u32 *more_pending)
7373
struct arm_smccc_res get_wq_res;
7474
struct arm_smccc_args get_wq_ctx = {0};
7575

76-
get_wq_ctx.args[0] = ARM_SMCCC_CALL_VAL(ARM_SMCCC_STD_CALL,
76+
get_wq_ctx.args[0] = ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL,
7777
ARM_SMCCC_SMC_64, ARM_SMCCC_OWNER_SIP,
7878
SCM_SMC_FNID(QCOM_SCM_SVC_WAITQ, QCOM_SCM_WAITQ_GET_WQ_CTX));
7979

0 commit comments

Comments
 (0)