From: Viresh Kumar <viresh.kumar@linaro.org>
To: Leonard Crestez <leonard.crestez@nxp.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org,
Octavian Purdila <octavian.purdila@nxp.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests: cpufreq: Check cpuinfo_cur_freq set as expected
Date: Wed, 19 Jul 2017 12:24:06 +0530 [thread overview]
Message-ID: <20170719065406.GE352@vireshk-i7> (raw)
In-Reply-To: <1500406459.11874.1.camel@nxp.com>
On 18-07-17, 22:34, Leonard Crestez wrote:
> The semantics of scaling_cur_freq and cpuinfo_cur_freq are not very
> clear to me.
cpuinfo_cur_freq reads the frequency right from hardware all the time
and so can be slow. It can only be read by root if I remember
correctly.
Whereas scaling_cur_freq tries to read the cached frequency. But it
has changed a bit with the below mentioned patch.
> In my particular case I need to check cpuinfo_cur_freq because this is
> what ends up returning the rate of the arm clk. Otherwise
> scaling_cur_freq just returns policy->cur
Yeah, we may actually need to use cpuinfo_cur_freq as that is what
ends up giving the real freq.
> unless the driver has a
> setpolicy function (I don't understand that condition).
That's because the core doesn't know the cached freq for setpolicy
drivers and so we need to call the ->get() callback. But for non
setpolicy drivers, core already has the cached value.
--
viresh
next prev parent reply other threads:[~2017-07-19 6:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 11:29 [PATCH] selftests: cpufreq: Check cpuinfo_cur_freq set as expected Leonard Crestez
2017-07-12 11:36 ` Rafael J. Wysocki
2017-07-12 16:51 ` Leonard Crestez
2017-07-12 20:38 ` Rafael J. Wysocki
2017-07-13 8:55 ` Viresh Kumar
2017-07-18 19:34 ` Leonard Crestez
2017-07-19 6:54 ` Viresh Kumar [this message]
2017-07-19 12:47 ` Rafael J. Wysocki
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=20170719065406.GE352@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=leonard.crestez@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=octavian.purdila@nxp.com \
--cc=rjw@rjwysocki.net \
--cc=shuah@kernel.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