From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Leonard Crestez <leonard.crestez@nxp.com>,
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 14:47:30 +0200 [thread overview]
Message-ID: <3568375.ceg5RryLQe@aspire.rjw.lan> (raw)
In-Reply-To: <20170719065406.GE352@vireshk-i7>
On Wednesday, July 19, 2017 12:24:06 PM Viresh Kumar wrote:
> 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.
Please remember that cpuinfo_cur_freq may not be present.
Thanks,
Rafael
prev parent reply other threads:[~2017-07-19 12:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 11:29 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
2017-07-19 12:47 ` Rafael J. Wysocki [this message]
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=3568375.ceg5RryLQe@aspire.rjw.lan \
--to=rjw@rjwysocki.net \
--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=shuah@kernel.org \
--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
all inboxes | Powered by JetHome®