lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201124104346.27167-3-lukasz.luba@arm.com>
Date:   Tue, 24 Nov 2020 10:43:46 +0000
From:   Lukasz Luba <lukasz.luba@....com>
To:     linux-kernel@...r.kernel.org, sudeep.holla@....com,
        linux-arm-kernel@...ts.infradead.org, linux-pm@...r.kernel.org
Cc:     lukasz.luba@....com, Dietmar.Eggemann@....com,
        cristian.marussi@....com, morten.rasmussen@....com,
        viresh.kumar@...aro.org, rafael@...nel.org
Subject: [PATCH 2/2] cpufreq: arm_scmi: Discover the power scale in performance protocol

Add mechanism to discover the power scale present in the performance
protocol for all domains. Provide this information to Energy Model,
which then can be checked in other frameworks, e.g. thermal.

Suggested-by: Morten Rasmussen <morten.rasmussen@....com>
Signed-off-by: Lukasz Luba <lukasz.luba@....com>
---
 drivers/cpufreq/scmi-cpufreq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index dfd87752f054..491a0a24fb1e 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -126,6 +126,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
 	struct scmi_data *priv;
 	struct cpufreq_frequency_table *freq_table;
 	struct em_data_callback em_cb = EM_DATA_CB(scmi_get_cpu_power);
+	bool power_scale_mw;
 
 	cpu_dev = get_cpu_device(policy->cpu);
 	if (!cpu_dev) {
@@ -189,8 +190,9 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
 	policy->fast_switch_possible =
 		handle->perf_ops->fast_switch_possible(handle, cpu_dev);
 
+	power_scale_mw = handle->perf_ops->power_scale_mw_get(handle);
 	em_dev_register_perf_domain(cpu_dev, nr_opp, &em_cb, policy->cpus,
-				    false);
+				    power_scale_mw);
 
 	return 0;
 
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ