Skip to content

OPP: Remove OPPs when not in use

Viresh Kumar linux-arm-kernel linux-pm 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8opp: rename 'head' as 'rcu_head' or 'srcu_head' based on its typedrivers/base/power/opp.c+10 -100 replies
2/8opp: don't match for existing OPPs when list is emptydrivers/base/power/opp.c+9 -60 replies
3/8opp: mark OPPs as 'static' or 'dynamic'drivers/base/power/opp.c+34 -250 replies
4/8opp: Introduce APIs to remove OPPsdrivers/base/power/opp.c include/linux/pm_opp.h+113 -13 replies
4/8opp: Introduce APIs to remove OPPs+0 -01 reply
4/8opp: Introduce APIs to remove OPPs+0 -00 replies
4/8opp: Introduce APIs to remove OPPsdrivers/base/power/opp.c+0 -01 reply
4/8opp: Introduce APIs to remove OPPs+0 -01 reply
5/8arm_big_little: free OPP table created during ->init()drivers/cpufreq/arm_big_little.c drivers/cpufreq/arm_big_little.h drivers/cpufreq/arm_big_little_dt.c+11 -20 replies
5/8opp: replace kfree_rcu() with call_srcu() in opp_set_availability()drivers/base/power/opp.c+1 -10 replies
5/8arm_big_little: free OPP table created during ->init()+0 -01 reply
5/8arm_big_little: free OPP table created during ->init()+0 -00 replies
6/8cpufreq-dt: free OPP table created during ->init()drivers/cpufreq/cpufreq-dt.c+4 -21 reply
7/8exynos5440: free OPP table created during ->init()drivers/cpufreq/exynos5440-cpufreq.c+4 -10 replies
8/8imx6q: free OPP table created during ->init()drivers/cpufreq/imx6q-cpufreq.c+10 -10 replies

Reviews trailers per patch

None of the 15 patches has a Reviewed-by or Acked-by.

PatchStefan Wahren
1/8
2/8
3/8
4/8
4/8
4/8
4/8
4/8
5/8
5/8
5/8
5/8
6/8T-b
7/8
8/8

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 0/8] OPP: Remove OPPs when not in use

Hi Rafael,

This is what I came up with in reply to:
http://www.spinics.net/lists/arm-kernel/msg380065.html

The issue was first reported by Stefan Wahren, where he got warnings for duplicate OPP entries while he tried to insert/remove cpufreq-dt.ko multiple times.

This set fixes it by first marking each OPP entry as static (created from DT) or dynamic. And then freeing only static ones from the ->exit() path of cpufreq drivers. An API is also provided to remove the dynamics ones, but no one is using it currently.

This also modifies bunch of cpufreq drivers which were using OPPs created from DT.

At last, thanks to Paul and You to clarify my doubts on RCU. Hope I understood them correctly :)

Pushed here: git://git.linaro.org/people/viresh.kumar/linux.git cpufreq/opp-remove-v1 Rebased over: pm/linux-next
Tested-on: Exynos 5250, dual cortex A15 with cpufreq-dt.c.

Cc Paul McKenney <[email protected]>

Viresh Kumar (8):
opp: rename 'head' as 'rcu_head' or 'srcu_head' based on its type
opp: don't match for existing OPPs when list is empty
opp: mark OPPs as 'static' or 'dynamic'
opp: Introduce APIs to remove OPPs
arm_big_little: free OPP table created during ->init()
cpufreq-dt: free OPP table created during ->init()
exynos5440: free OPP table created during ->init()
imx6q: free OPP table created during ->init()

 drivers/base/power/opp.c             | 196 +++++++++++++++++++++++++++--------
 drivers/cpufreq/arm_big_little.c     |   7 +-
 drivers/cpufreq/arm_big_little.h     |   5 +-
 drivers/cpufreq/arm_big_little_dt.c  |   1 +
 drivers/cpufreq/cpufreq-dt.c         |   6 +-
 drivers/cpufreq/exynos5440-cpufreq.c |   5 +-
 drivers/cpufreq/imx6q-cpufreq.c      |  11 +-
 include/linux/pm_opp.h               |  12 ++-
 8 files changed, 195 insertions(+), 48 deletions(-)
Signature · 1 line
2.0.3.693.g996b0fd