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-next>] [day] [month] [year] [list]
Message-Id: <1500372171-7194-1-git-send-email-jeffy.chen@rock-chips.com>
Date:   Tue, 18 Jul 2017 18:02:51 +0800
From:   Jeffy Chen <jeffy.chen@...k-chips.com>
To:     linux-kernel@...r.kernel.org
Cc:     rui.zhang@...el.com, briannorris@...omium.org,
        javi.merino@...nel.org, dianders@...omium.org, lukasz.luba@....com,
        Jeffy Chen <jeffy.chen@...k-chips.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Kyungmin Park <kyungmin.park@...sung.com>,
        MyungJoo Ham <myungjoo.ham@...sung.com>,
        linux-pm@...r.kernel.org
Subject: [PATCH] devfreq: simple_ondemand: Update devfreq stats when governor started

If governor suspends soon after started, it may not have the chance to
update devfreq stats, which leaves devfreq stats' current frequence be
zero.

So when the thermal core tries to throttle the power, it would failed
to get the correct static power of current frequence and print these
warnings:
[    2.024735] core: dev_pm_opp_get_voltage: Invalid parameters
[    2.024743] mali ff9a0000.gpu: Failed to get voltage for frequency 0:
-34
...
[    2.026320] core: dev_pm_opp_get_voltage: Invalid parameters
[    2.026327] mali ff9a0000.gpu: Failed to get voltage for frequency 0:
-34

Update devfreq stats when governor started to avoid that.

Signed-off-by: Jeffy Chen <jeffy.chen@...k-chips.com>
---

 drivers/devfreq/governor_simpleondemand.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/devfreq/governor_simpleondemand.c b/drivers/devfreq/governor_simpleondemand.c
index ae72ba5..26e0e58 100644
--- a/drivers/devfreq/governor_simpleondemand.c
+++ b/drivers/devfreq/governor_simpleondemand.c
@@ -98,6 +98,7 @@ static int devfreq_simple_ondemand_handler(struct devfreq *devfreq,
 {
 	switch (event) {
 	case DEVFREQ_GOV_START:
+		devfreq_update_stats(devfreq);
 		devfreq_monitor_start(devfreq);
 		break;
 
-- 
2.1.4


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ