Skip to content

cpufreq: simplify boost handling

Viresh Kumar arm-scmi asahi linux-arm-kernel linux-arm-msm linux-pm linuxppc-dev lkml loongarch 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15cpufreq: staticize cpufreq_boost_trigger_state()drivers/cpufreq/cpufreq.c include/linux/cpufreq.h+2 -60 replies
2/15cpufreq: Export cpufreq_boost_set_sw()drivers/cpufreq/cpufreq.c include/linux/cpufreq.h+8 -10 replies
3/15cpufreq: Introduce policy->boost_supported flagdrivers/cpufreq/freq_table.c include/linux/cpufreq.h+7 -00 replies
4/15cpufreq: acpi: Set policy->boost_supporteddrivers/cpufreq/acpi-cpufreq.c+3 -00 replies
5/15cpufreq: amd: Set policy->boost_supporteddrivers/cpufreq/amd-pstate.c+2 -21 reply
6/15cpufreq: cppc: Set policy->boost_supporteddrivers/cpufreq/cppc_cpufreq.c+1 -83 replies
7/15cpufreq: Restrict enabling boost on policies with no boost frequenciesdrivers/cpufreq/cpufreq.c+8 -10 replies
8/15cpufreq: apple: Set .set_boost directlydrivers/cpufreq/apple-soc-cpufreq.c+1 -90 replies
9/15cpufreq: loongson: Set .set_boost directlydrivers/cpufreq/loongson3_cpufreq.c+1 -90 replies
10/15cpufreq: powernv: Set .set_boost directlydrivers/cpufreq/powernv-cpufreq.c+1 -40 replies
11/15cpufreq: scmi: Set .set_boost directlydrivers/cpufreq/scmi-cpufreq.c+1 -101 reply
12/15cpufreq: dt: Set .set_boost directlydrivers/cpufreq/cpufreq-dt.c+1 -130 replies
13/15cpufreq: qcom: Set .set_boost directlydrivers/cpufreq/qcom-cpufreq-hw.c+1 -60 replies
14/15cpufreq: staticize policy_has_boost_freq()drivers/cpufreq/freq_table.c include/linux/cpufreq.h+1 -80 replies
15/15cpufreq: Remove cpufreq_enable_boost_support()drivers/cpufreq/cpufreq.c include/linux/cpufreq.h+0 -210 replies

Reviews trailers per patch

2 of 15 patches have a Reviewed-by or Acked-by.

PatchSudeep HollaLifeng Zheng
1/15
2/15
3/15
4/15
5/15
6/15R-b
7/15
8/15
9/15
10/15
11/15A-b
12/15
13/15
14/15
15/15

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/15] cpufreq: simplify boost handling

Hello,

The boost feature can be controlled at two levels currently, driver level (applies to all policies) and per-policy.

Currently most of the drivers enables driver level boost support from the per-policy ->init() callback, which isn't really efficient as that gets called for each policy and then there is online/offline path too where this gets done unnecessarily.

Also it is possible to have a scenario where not all cpufreq policies support boost frequencies. And letting sysfs (or other parts of the kernel) enable boost feature for that policy isn't correct.

Simplify and cleanup handling of boost to solve these issues.

Pushed here:

git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git cpufreq/boost

Rebased over few dependencies from PM tree, will push to the arm-cpufreq tree after merge window is closed.

Viresh Kumar (15):
cpufreq: staticize cpufreq_boost_trigger_state()
cpufreq: Export cpufreq_boost_set_sw()
cpufreq: Introduce policy->boost_supported flag
cpufreq: acpi: Set policy->boost_supported
cpufreq: amd: Set policy->boost_supported
cpufreq: cppc: Set policy->boost_supported
cpufreq: Restrict enabling boost on policies with no boost frequencies
cpufreq: apple: Set .set_boost directly
cpufreq: loongson: Set .set_boost directly
cpufreq: powernv: Set .set_boost directly
cpufreq: scmi: Set .set_boost directly
cpufreq: dt: Set .set_boost directly
cpufreq: qcom: Set .set_boost directly
cpufreq: staticize policy_has_boost_freq()
cpufreq: Remove cpufreq_enable_boost_support()

 drivers/cpufreq/acpi-cpufreq.c      |  3 +++
 drivers/cpufreq/amd-pstate.c        |  4 ++--
 drivers/cpufreq/apple-soc-cpufreq.c | 10 +---------
 drivers/cpufreq/cppc_cpufreq.c      |  9 +--------
 drivers/cpufreq/cpufreq-dt.c        | 14 +-------------
 drivers/cpufreq/cpufreq.c           | 30 ++++++++++++-----------------
 drivers/cpufreq/freq_table.c        |  7 +++++--
 drivers/cpufreq/loongson3_cpufreq.c | 10 +---------
 drivers/cpufreq/powernv-cpufreq.c   |  5 +----
 drivers/cpufreq/qcom-cpufreq-hw.c   |  7 +------
 drivers/cpufreq/scmi-cpufreq.c      | 11 +----------
 include/linux/cpufreq.h             | 20 ++++++-------------
 12 files changed, 35 insertions(+), 95 deletions(-)
Signature · 1 line
2.31.1.272.g89b43f80a514