summaryrefslogtreecommitdiff
path: root/drivers/cpuidle/cpuidle-qcom-spm.c
diff options
context:
space:
mode:
authorStephan Gerhold <stephan@gerhold.net>2021-12-01 16:05:04 +0300
committerBjorn Andersson <bjorn.andersson@linaro.org>2022-02-04 06:54:48 +0300
commit52beb1fc237d67cdc64277dc90047767a6fc52d7 (patch)
treec27125a7ef6b0277acba05e6ab94ac127a06e23a /drivers/cpuidle/cpuidle-qcom-spm.c
parent7734c4b507cefbcf2f7a2a806e79c43e52528c5f (diff)
downloadlinux-52beb1fc237d67cdc64277dc90047767a6fc52d7.tar.xz
firmware: qcom: scm: Drop cpumask parameter from set_boot_addr()
qcom_scm_set_cold/warm_boot_addr() currently take a cpumask parameter, but it's not very useful because at the end we always set the same entry address for all CPUs. This also allows speeding up probe of cpuidle-qcom-spm a bit because only one SCM call needs to be made to the TrustZone firmware, instead of one per CPU. The main reason for this change is that it allows implementing the "multi-cluster" variant of the set_boot_addr() call more easily without having to rely on functions that break in certain build configurations or that are not exported to modules. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20211201130505.257379-4-stephan@gerhold.net
Diffstat (limited to 'drivers/cpuidle/cpuidle-qcom-spm.c')
-rw-r--r--drivers/cpuidle/cpuidle-qcom-spm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/cpuidle/cpuidle-qcom-spm.c b/drivers/cpuidle/cpuidle-qcom-spm.c
index 5f27dcc6c110..beedf22cbe78 100644
--- a/drivers/cpuidle/cpuidle-qcom-spm.c
+++ b/drivers/cpuidle/cpuidle-qcom-spm.c
@@ -122,10 +122,6 @@ static int spm_cpuidle_register(struct device *cpuidle_dev, int cpu)
if (ret <= 0)
return ret ? : -ENODEV;
- ret = qcom_scm_set_warm_boot_addr(cpu_resume_arm, cpumask_of(cpu));
- if (ret)
- return ret;
-
return cpuidle_register(&data->cpuidle_driver, NULL);
}
@@ -136,6 +132,10 @@ static int spm_cpuidle_drv_probe(struct platform_device *pdev)
if (!qcom_scm_is_available())
return -EPROBE_DEFER;
+ ret = qcom_scm_set_warm_boot_addr(cpu_resume_arm);
+ if (ret)
+ return dev_err_probe(&pdev->dev, ret, "set warm boot addr failed");
+
for_each_possible_cpu(cpu) {
ret = spm_cpuidle_register(&pdev->dev, cpu);
if (ret && ret != -ENODEV) {