[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <e221cef4-a26c-4f9d-ae5c-7dffa78b5e66@kylinos.cn>
Date: Tue, 23 Sep 2025 16:53:46 +0800
From: Zihuan Zhang <zhangzihuan@...inos.cn>
To: "Rafael J. wysocki" <rafael@...nel.org>,
Viresh Kumar <viresh.kumar@...aro.org>
Cc: "zhenglifeng (A)" <zhenglifeng1@...wei.com>,
Linux PM <linux-pm@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>
Subject: [Question] About unnecessary policy_has_boost_freq() calls in
freq_table.c
Hi all,
While reviewing the cpufreq code, I noticed that in
cpufreq_table_validate_and_sort() the function policy_has_boost_freq()
is still being called, even though most cpufreq drivers do not make use
of the CPUFREQ_BOOST_FREQ flag.
code in cpufreq_table_validate_and_sort():
/* Driver's may have set this field already */
if (policy_has_boost_freq(policy))
policy->boost_supported = true;
For drivers like acpi-cpufreq that don’t rely on CPUFREQ_BOOST_FREQ
flag, this extra check looks confusing and possibly unnecessary.
Would it make sense to move this check into cpufreq_boost_set_sw()
instead, so that the call is only made when boost is actually relevant?
Thanks,
Zihuan Zhang
Powered by blists - more mailing lists