From: Mason <slash.tmp@free.fr>
To: linux-pm <linux-pm@vger.kernel.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
Javi Merino <javi.merino@arm.com>,
Eduardo Valentin <edubezval@gmail.com>,
Sebastian Frias <sf84@laposte.net>
Subject: Weird interaction between thermal and cpufreq drivers
Date: Thu, 28 Apr 2016 17:24:54 +0200 [thread overview]
Message-ID: <57222B46.4070502@free.fr> (raw)
Hello linux-pm,
I'm seeing a weird bug, where the thermal driver(*) returns bogus
temperatures once I lower the CPU frequency.
(*) drivers/thermal/tango_thermal.c
The setup: I'm using next-20160428
(Is it a good idea to test on linux-next?
Are there bugs lurking there that get sorted out later?)
I have a script which prints /sys/class/thermal/thermal_zone0/temp
every second.
When the CPU is running at nominal speed, these values seem correct.
("seem" because I don't have the HW to calibrate the thermometer.)
But once I lower the frequency of the CPU(*), the script starts
printing bogus values like 29000 (my driver's minimum) and very
high temps like 100000 or even 137000!
(*) echo 135000 > /sys/devices/system/cpu/cpufreq/scaling_max_freq
I'm using the performance governor, so everything should be manual,
if I understand correctly.
I looked at timing issues in my driver. I do have an obvious
usleep_range(10, 20); in my code. IIUC, this primitive will use
the underlying Cortex A9 twd block, which does introduce errors
on frequency changes, so I switched it to udelay(100); This one
should only use the platform tick counter, which ticks at a
constant speed. But I still have the issues.
Any idea what could be going wrong?
I guess I can test on v4.6-rc5
Regards.
next reply other threads:[~2016-04-28 15:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-28 15:24 Mason [this message]
2016-05-03 15:34 ` Weird interaction between thermal and cpufreq drivers Mason
2016-05-03 15:40 ` [PATCH] thermal: tango: initialize TEMPSI_CFG Mason
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=57222B46.4070502@free.fr \
--to=slash.tmp@free.fr \
--cc=edubezval@gmail.com \
--cc=javi.merino@arm.com \
--cc=linux-pm@vger.kernel.org \
--cc=sf84@laposte.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.