From: Martin Kepplinger <martin.kepplinger@puri.sm>
To: daniel.lezcano@linaro.org, edubezval@gmail.com, rui.zhang@intel.com
Cc: rjw@rjwysocki.net, linux-pm@vger.kernel.org,
viresh.kumar@linaro.org, amit.kucheria@linaro.org,
linux-kernel@vger.kernel.org,
Martin Kepplinger <martin.kepplinger@puri.sm>
Subject: Re: [PATCH V4 4/4] thermal/drivers/cpu_cooling: Rename to cpufreq_cooling
Date: Fri, 6 Dec 2019 12:33:15 +0100 [thread overview]
Message-ID: <20191206113315.18954-1-martin.kepplinger@puri.sm> (raw)
In-Reply-To: <20191204153930.9128-4-daniel.lezcano@linaro.org>
I tested this on the librem5-devkit and see the
cooling devices in sysfs. I configure ARM_PSCI_CPUIDLE, not ARM_CPUIDLE and
add the patch below in register the cooling device there. "psci_idle"
is listed as the cpuidle_driver.
That's what I'm running, in case you want to see it all:
https://source.puri.sm/martin.kepplinger/linux-next/commits/next-20191205/librem5_cpuidle_mainline_atf
so I add a trip temperature description like this:
https://source.puri.sm/martin.kepplinger/linux-next/commit/361f49f93ae2c477fd012790831cabd0ed976660
When I let the SoC heat up, cpuidle cooling won't kick it. In sysfs:
catting the relevant files in /sys/class/thermal after heating up,
if that makes sense:
87000
85000
85000
thermal-cpufreq-0
1
thermal-idle-0
0
thermal-idle-1
0
thermal-idle-2
0
thermal-idle-3
0
with ARM_CPUIDLE instead of ARM_PSCI_CPUIDLE (and registering the cooling dev
during cpuidle-arm.c init) I won't have a cpuidle driver and thus no cpu-sleep
state at all.
Can you see where the problem here lies?
thanks!
martin
---
drivers/cpuidle/cpuidle-psci.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
index f3c1a2396f98..de6e7f444a66 100644
--- a/drivers/cpuidle/cpuidle-psci.c
+++ b/drivers/cpuidle/cpuidle-psci.c
@@ -8,6 +8,7 @@
#define pr_fmt(fmt) "CPUidle PSCI: " fmt
+#include <linux/cpu_cooling.h>
#include <linux/cpuidle.h>
#include <linux/cpumask.h>
#include <linux/cpu_pm.h>
@@ -195,6 +196,8 @@ static int __init psci_idle_init_cpu(int cpu)
if (ret)
goto out_kfree_drv;
+ cpuidle_cooling_register(drv);
+
return 0;
out_kfree_drv:
--
2.20.1
next prev parent reply other threads:[~2019-12-06 11:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-04 15:39 [PATCH V4 1/4] thermal/drivers/Kconfig: Convert the CPU cooling device to a choice Daniel Lezcano
2019-12-04 15:39 ` [PATCH V4 2/4] thermal/drivers/cpu_cooling: Add idle cooling device documentation Daniel Lezcano
2019-12-04 15:39 ` [PATCH V4 3/4] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver Daniel Lezcano
2019-12-04 15:39 ` [PATCH V4 4/4] thermal/drivers/cpu_cooling: Rename to cpufreq_cooling Daniel Lezcano
2019-12-06 11:33 ` Martin Kepplinger [this message]
2019-12-06 14:15 ` Daniel Lezcano
2019-12-09 9:54 ` Martin Kepplinger
2019-12-09 12:03 ` Daniel Lezcano
2019-12-09 19:29 ` Daniel Lezcano
2019-12-10 8:57 ` Martin Kepplinger
2019-12-10 9:15 ` Daniel Lezcano
2019-12-11 21:33 ` Daniel Lezcano
2019-12-12 7:34 ` Martin Kepplinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191206113315.18954-1-martin.kepplinger@puri.sm \
--to=martin.kepplinger@puri.sm \
--cc=amit.kucheria@linaro.org \
--cc=daniel.lezcano@linaro.org \
--cc=edubezval@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).