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: <20201028140847.1018-5-lukasz.luba@arm.com>
Date:   Wed, 28 Oct 2020 14:08:47 +0000
From:   Lukasz Luba <lukasz.luba@....com>
To:     linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        vireshk@...nel.org, robh+dt@...nel.org
Cc:     sboyd@...nel.org, nm@...com, rafael@...nel.org,
        sudeep.holla@....com, daniel.lezcano@...aro.org,
        Dietmar.Eggemann@....com, lukasz.luba@....com
Subject: [PATCH 4/4] firmware: arm_scmi/perf: Mark sustainable OPP

Mark sustainable OPP frequency based on previously received value from
the firmware.

Signed-off-by: Lukasz Luba <lukasz.luba@....com>
---
 drivers/firmware/arm_scmi/perf.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c
index 82fb3babff72..a8f3fa1d7f1e 100644
--- a/drivers/firmware/arm_scmi/perf.c
+++ b/drivers/firmware/arm_scmi/perf.c
@@ -669,6 +669,16 @@ static int scmi_dvfs_device_opps_add(const struct scmi_handle *handle,
 			return ret;
 		}
 	}
+
+	if (dom->sustained_freq_khz) {
+		/* The sustained frequency is always in kHz */
+		freq = dom->sustained_freq_khz * 1000;
+		ret = dev_pm_opp_set_sustainable_opp_freq(dev, freq);
+		if (ret)
+			dev_warn(dev, "failed to add sustainable freq=%lu %d\n",
+				 freq, ret);
+	}
+
 	return 0;
 }
 
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ