From: Sumit Gupta <sumitg@nvidia.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: <rjw@rjwysocki.net>, <thierry.reding@gmail.com>,
<jonathanh@nvidia.com>, <linux-pm@vger.kernel.org>,
<linux-tegra@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <ksitaraman@nvidia.com>,
<bbasu@nvidia.com>, Sumit Gupta <sumitg@nvidia.com>
Subject: Re: [Patch 2/2] cpufreq: tegra194: Fix unlisted boot freq warning
Date: Thu, 8 Oct 2020 16:41:06 +0530 [thread overview]
Message-ID: <7e285f41-e1ae-e352-9d1b-efd4d20ddfa3@nvidia.com> (raw)
In-Reply-To: <20201006053856.dth6ut22pvwpgfz5@vireshk-i7>
>>
>>>> Warning coming during boot because the boot freq set by bootloader
>>>> gets filtered out due to big freq steps while creating freq_table.
>>>> Fixing this by setting closest ndiv value from freq_table.
>>>> Warning:
>>>> cpufreq: cpufreq_online: CPU0: Running at unlisted freq
>>>> cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed
>>>>
>>>> Also, added change in init to wait till current frequency becomes
>>>> equal or near to the previously requested frequency. This is done
>>>> because it takes some time to restore the previous frequency while
>>>> turning-on non-boot cores during exit from SC7(Suspend-to-RAM).
>>>
>>> So you are trying to figure if the frequency is listed in freq-table or not,
>>> otherwise setting the frequency to a value you think is appropriate. Right ?
>> During boot, want to set the frequency from freq_table which is closest to
>> the one set by bootloader.
>
> Right.
>
>> During resume from suspend-to-idle, want to restore the frequency which was
>> set on non-boot cores before they were hotplug powered off.
>
> Why exactly do you want to do that ? Rather you should provide
> online/offline hooks for the cpufreq driver and do light-weight
> suspend/resume as is done by cpufreq-dt.c as well.
>
Thank you for pointer. Added online hook to avoid warning during
hot-plug-on for the non-boot CPU's while exiting from Suspend-to-RAM. Will
send new version with the changes.
>>>
>>> This is what the cpufreq core already does when it printed these boot time
>>> messages. Do we really need to add this much code in here ?
>> We want to avoid the warning messages.
>
> Hmm, okay.
>
>>>
>>> If you really don't want to see the warning, how about fixing it the way cpufreq
>>> core does ? i.e. with this call:
>>>
>>> ret = __cpufreq_driver_target(policy, policy->cur - 1, CPUFREQ_RELATION_L);
>>>
>> The cpufreq core change will help in bootup case but not during the case of
>> resume.
>> In this change, reading the previously stored value and restoring it will
>> also fix the warning message during resume.
>
> You were getting the message during resume as well ? Why ? The
> firmware is updating the frequency to a previous value ? If that is
> so, you should just set the frequency again to some other value during
> resume to fix it.
Yes, it boots at a predefined frequency and then some time is taken to
restore the last frequency which software requested before entering
Suspend-to-RAM. We don't need to re-write the register again.
>
> --
> viresh
>
prev parent reply other threads:[~2020-10-08 11:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-16 17:11 [Patch 0/2] Tegra194 cpufreq driver misc changes Sumit Gupta
2020-09-16 17:11 ` [Patch 1/2] cpufreq: tegra194: get consistent cpuinfo_cur_freq Sumit Gupta
2020-09-17 8:36 ` Jon Hunter
2020-09-17 8:44 ` Jon Hunter
2020-09-23 8:34 ` Jon Hunter
2020-10-05 4:34 ` Viresh Kumar
2020-10-05 9:12 ` Jon Hunter
2020-09-24 8:56 ` Thierry Reding
2020-10-05 4:46 ` Viresh Kumar
2020-10-05 18:40 ` Sumit Gupta
2020-09-16 17:11 ` [Patch 2/2] cpufreq: tegra194: Fix unlisted boot freq warning Sumit Gupta
2020-09-17 8:38 ` Jon Hunter
2020-09-17 8:45 ` Jon Hunter
2020-09-24 8:56 ` Thierry Reding
2020-10-05 4:54 ` Viresh Kumar
2020-10-05 18:54 ` Sumit Gupta
2020-10-06 5:38 ` Viresh Kumar
2020-10-08 11:11 ` Sumit Gupta [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=7e285f41-e1ae-e352-9d1b-efd4d20ddfa3@nvidia.com \
--to=sumitg@nvidia.com \
--cc=bbasu@nvidia.com \
--cc=jonathanh@nvidia.com \
--cc=ksitaraman@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=thierry.reding@gmail.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).