From: PoShao Chen <poshao.chen@mediatek.com>
To: <viresh.kumar@linaro.org>
Cc: <ccj.yeh@mediatek.com>, <ching-hao.hsu@mediatek.com>,
<clive.lin@mediatek.com>, <linux-kernel@vger.kernel.org>,
<linux-pm@vger.kernel.org>, <poshao.chen@mediatek.com>,
<rafael@kernel.org>
Subject: Re: [PATCH v2] cpufreq: Fix per-policy boost behavior after CPU hotplug
Date: Mon, 17 Jun 2024 13:48:38 +0800 [thread overview]
Message-ID: <20240617054838.9224-1-poshao.chen@mediatek.com> (raw)
In-Reply-To: <20240613092054.f6obecbvf45frcqw@vireshk-i7>
On Thu, 2024-06-13 at 14:50 +0530, Viresh Kumar wrote:
> Please try this instead:
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 7c6879efe9ef..bd9fe2b0f032 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -43,6 +43,9 @@ static LIST_HEAD(cpufreq_policy_list);
> #define for_each_inactive_policy(__policy) \
> for_each_suitable_policy(__policy, false)
>
> +#define for_each_policy(__policy) \
> + list_for_each_entry(__policy, &cpufreq_policy_list,
> policy_list)
> +
> /* Iterate over governors */
> static LIST_HEAD(cpufreq_governor_list);
> #define for_each_governor(__governor) \
> @@ -2815,7 +2818,7 @@ int cpufreq_boost_trigger_state(int state)
> write_unlock_irqrestore(&cpufreq_driver_lock, flags);
>
> cpus_read_lock();
> - for_each_active_policy(policy) {
> + for_each_policy(policy) {
> policy->boost_enabled = state;
> ret = cpufreq_driver->set_boost(policy, state);
> if (ret) {
>
> --
> viresh
Thank you for the suggestion. However, calling ->set_boost when
the policy is inactive will fail in two ways:
1. policy->freq_table will be NULL.
2. freq_qos_update_request will fail to refresh the frequency limit.
--
poshao
next prev parent reply other threads:[~2024-06-17 5:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-12 3:31 PoShao Chen
2024-06-13 9:20 ` Viresh Kumar
2024-06-17 5:48 ` PoShao Chen [this message]
2024-06-25 10:05 ` Viresh Kumar
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=20240617054838.9224-1-poshao.chen@mediatek.com \
--to=poshao.chen@mediatek.com \
--cc=ccj.yeh@mediatek.com \
--cc=ching-hao.hsu@mediatek.com \
--cc=clive.lin@mediatek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@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®