linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/6] Initialise thermal framework and cpufreq earlier during boot
@ 2019-10-17 12:27 Amit Kucheria
  2019-10-17 12:27 ` [PATCH v3 5/6] clk: qcom: Initialise clock drivers earlier Amit Kucheria
  0 siblings, 1 reply; 6+ messages in thread
From: Amit Kucheria @ 2019-10-17 12:27 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, daniel.lezcano, viresh.kumar,
	sudeep.holla, bjorn.andersson, edubezval, agross, tdas, swboyd,
	ilina, Rafael J. Wysocki, Amit Kucheria, Zhang Rui
  Cc: linux-clk, linux-doc, linux-pm

Changes since v2:
- Missed one patch when posting v2. Respinning.

Changes since v1:
- Completely get rid of netlink support in the thermal framework.
- This changes the early init patch to a single line - change to
  core_initcall. Changed authorship of patch since it is nothing like the
  original. Lina, let me know if you feel otherwise.
- I've tested to make sure that the qcom-cpufreq-hw driver continues to
  work correctly as a module so this won't impact Android's GKI plans.
- Collected Acks

Device boot needs to be as fast as possible while keeping under the thermal
envelope. Now that thermal framework is built-in to the kernel, we can
initialize it earlier to enable thermal mitigation during boot.

We also need the cpufreq HW drivers to be initialised earlier to act as the
cooling devices. This series only converts over the qcom-hw driver to
initialize earlier but can be extended to other platforms as well.

Amit Kucheria (6):
  thermal: Remove netlink support
  thermal: Initialize thermal subsystem earlier
  cpufreq: Initialise the governors in core_initcall
  cpufreq: Initialize cpufreq-dt driver earlier
  clk: qcom: Initialise clock drivers earlier
  cpufreq: qcom-hw: Move driver initialisation earlier

 .../driver-api/thermal/sysfs-api.rst          |  26 +----
 drivers/clk/qcom/clk-rpmh.c                   |   2 +-
 drivers/clk/qcom/gcc-qcs404.c                 |   2 +-
 drivers/clk/qcom/gcc-sdm845.c                 |   2 +-
 drivers/cpufreq/cpufreq-dt-platdev.c          |   2 +-
 drivers/cpufreq/cpufreq_conservative.c        |   2 +-
 drivers/cpufreq/cpufreq_ondemand.c            |   2 +-
 drivers/cpufreq/cpufreq_performance.c         |   2 +-
 drivers/cpufreq/cpufreq_powersave.c           |   2 +-
 drivers/cpufreq/cpufreq_userspace.c           |   2 +-
 drivers/cpufreq/qcom-cpufreq-hw.c             |   2 +-
 drivers/thermal/thermal_core.c                | 110 +-----------------
 include/linux/thermal.h                       |  11 --
 13 files changed, 22 insertions(+), 145 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 5/6] clk: qcom: Initialise clock drivers earlier
  2019-10-17 12:27 [PATCH v3 0/6] Initialise thermal framework and cpufreq earlier during boot Amit Kucheria
@ 2019-10-17 12:27 ` Amit Kucheria
  2019-10-17 17:47   ` Stephen Boyd
  0 siblings, 1 reply; 6+ messages in thread
From: Amit Kucheria @ 2019-10-17 12:27 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, daniel.lezcano, viresh.kumar,
	sudeep.holla, bjorn.andersson, edubezval, agross, tdas, swboyd,
	ilina, Rafael J. Wysocki, Amit Kucheria, Zhang Rui
  Cc: linux-clk

Initialise the clock drivers on sdm845 and qcs404 in core_initcall so we
can have earlier access to cpufreq during booting.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
 drivers/clk/qcom/clk-rpmh.c   | 2 +-
 drivers/clk/qcom/gcc-qcs404.c | 2 +-
 drivers/clk/qcom/gcc-sdm845.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
index 96a36f6ff667..20d4258f125b 100644
--- a/drivers/clk/qcom/clk-rpmh.c
+++ b/drivers/clk/qcom/clk-rpmh.c
@@ -487,7 +487,7 @@ static int __init clk_rpmh_init(void)
 {
 	return platform_driver_register(&clk_rpmh_driver);
 }
-subsys_initcall(clk_rpmh_init);
+core_initcall(clk_rpmh_init);
 
 static void __exit clk_rpmh_exit(void)
 {
diff --git a/drivers/clk/qcom/gcc-qcs404.c b/drivers/clk/qcom/gcc-qcs404.c
index bd32212f37e6..9b0c4ce2ef4e 100644
--- a/drivers/clk/qcom/gcc-qcs404.c
+++ b/drivers/clk/qcom/gcc-qcs404.c
@@ -2855,7 +2855,7 @@ static int __init gcc_qcs404_init(void)
 {
 	return platform_driver_register(&gcc_qcs404_driver);
 }
-subsys_initcall(gcc_qcs404_init);
+core_initcall(gcc_qcs404_init);
 
 static void __exit gcc_qcs404_exit(void)
 {
diff --git a/drivers/clk/qcom/gcc-sdm845.c b/drivers/clk/qcom/gcc-sdm845.c
index 95be125c3bdd..49dcff1af2db 100644
--- a/drivers/clk/qcom/gcc-sdm845.c
+++ b/drivers/clk/qcom/gcc-sdm845.c
@@ -3628,7 +3628,7 @@ static int __init gcc_sdm845_init(void)
 {
 	return platform_driver_register(&gcc_sdm845_driver);
 }
-subsys_initcall(gcc_sdm845_init);
+core_initcall(gcc_sdm845_init);
 
 static void __exit gcc_sdm845_exit(void)
 {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 5/6] clk: qcom: Initialise clock drivers earlier
  2019-10-17 12:27 ` [PATCH v3 5/6] clk: qcom: Initialise clock drivers earlier Amit Kucheria
@ 2019-10-17 17:47   ` Stephen Boyd
  2019-10-18  6:03     ` Viresh Kumar
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Boyd @ 2019-10-17 17:47 UTC (permalink / raw)
  To: Rafael J. Wysocki, Amit Kucheria, Amit Kucheria, Zhang Rui,
	agross, bjorn.andersson, daniel.lezcano, edubezval, ilina,
	linux-arm-msm, linux-kernel, sudeep.holla, tdas, viresh.kumar
  Cc: linux-clk

Quoting Amit Kucheria (2019-10-17 05:27:37)
> Initialise the clock drivers on sdm845 and qcs404 in core_initcall so we
> can have earlier access to cpufreq during booting.
> 
> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
> ---

Acked-by: Stephen Boyd <sboyd@kernel.org>

Makes me sad again.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 5/6] clk: qcom: Initialise clock drivers earlier
  2019-10-17 17:47   ` Stephen Boyd
@ 2019-10-18  6:03     ` Viresh Kumar
       [not found]       ` <20191028172225.1B1CF20862@mail.kernel.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Viresh Kumar @ 2019-10-18  6:03 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Rafael J. Wysocki, Amit Kucheria, Amit Kucheria, Zhang Rui,
	agross, bjorn.andersson, daniel.lezcano, edubezval, ilina,
	linux-arm-msm, linux-kernel, sudeep.holla, tdas, linux-clk

On 17-10-19, 10:47, Stephen Boyd wrote:
> Quoting Amit Kucheria (2019-10-17 05:27:37)
> > Initialise the clock drivers on sdm845 and qcs404 in core_initcall so we
> > can have earlier access to cpufreq during booting.
> > 
> > Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
> > ---
> 
> Acked-by: Stephen Boyd <sboyd@kernel.org>
> 
> Makes me sad again.

I am wondering why it makes you sad ? :)

-- 
viresh

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 5/6] clk: qcom: Initialise clock drivers earlier
       [not found]       ` <20191028172225.1B1CF20862@mail.kernel.org>
@ 2019-10-29  1:06         ` Sudeep Holla
  2019-11-05  6:50           ` Viresh Kumar
  0 siblings, 1 reply; 6+ messages in thread
From: Sudeep Holla @ 2019-10-29  1:06 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Viresh Kumar, Rafael J. Wysocki, Amit Kucheria, Amit Kucheria,
	Zhang Rui, agross, bjorn.andersson, daniel.lezcano, edubezval,
	ilina, linux-arm-msm, linux-kernel, tdas, linux-clk

On Mon, Oct 28, 2019 at 10:22:24AM -0700, Stephen Boyd wrote:
> Quoting Viresh Kumar (2019-10-17 23:03:45)
> > On 17-10-19, 10:47, Stephen Boyd wrote:
> > > Quoting Amit Kucheria (2019-10-17 05:27:37)
> > > > Initialise the clock drivers on sdm845 and qcs404 in core_initcall so we
> > > > can have earlier access to cpufreq during booting.
> > > >
> > > > Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
> > > > ---
> > >
> > > Acked-by: Stephen Boyd <sboyd@kernel.org>
> > >
> > > Makes me sad again.
> >
> > I am wondering why it makes you sad ? :)
> >
>
> We're playing games with initcall levels :(
>

+1, which will come back and bite us hard soon :)

--
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 5/6] clk: qcom: Initialise clock drivers earlier
  2019-10-29  1:06         ` Sudeep Holla
@ 2019-11-05  6:50           ` Viresh Kumar
  0 siblings, 0 replies; 6+ messages in thread
From: Viresh Kumar @ 2019-11-05  6:50 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: Stephen Boyd, Rafael J. Wysocki, Amit Kucheria, Amit Kucheria,
	Zhang Rui, agross, bjorn.andersson, daniel.lezcano, edubezval,
	ilina, linux-arm-msm, linux-kernel, tdas, linux-clk

On 29-10-19, 09:06, Sudeep Holla wrote:
> On Mon, Oct 28, 2019 at 10:22:24AM -0700, Stephen Boyd wrote:
> > Quoting Viresh Kumar (2019-10-17 23:03:45)
> > > On 17-10-19, 10:47, Stephen Boyd wrote:
> > > > Quoting Amit Kucheria (2019-10-17 05:27:37)
> > > > > Initialise the clock drivers on sdm845 and qcs404 in core_initcall so we
> > > > > can have earlier access to cpufreq during booting.
> > > > >
> > > > > Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
> > > > > ---
> > > >
> > > > Acked-by: Stephen Boyd <sboyd@kernel.org>
> > > >
> > > > Makes me sad again.
> > >
> > > I am wondering why it makes you sad ? :)
> > >
> >
> > We're playing games with initcall levels :(
> >
> 
> +1, which will come back and bite us hard soon :)

:)

I don't like reordering init calls as well, but only when they are
used to avoid issues and probe things in a particular order. While the
only thing we are doing here is to get things to probe earlier, which
isn't wrong IMO :)

Lets see if it bites us anytime soon, I would be surprised really :)

-- 
viresh

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-11-05  6:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-17 12:27 [PATCH v3 0/6] Initialise thermal framework and cpufreq earlier during boot Amit Kucheria
2019-10-17 12:27 ` [PATCH v3 5/6] clk: qcom: Initialise clock drivers earlier Amit Kucheria
2019-10-17 17:47   ` Stephen Boyd
2019-10-18  6:03     ` Viresh Kumar
     [not found]       ` <20191028172225.1B1CF20862@mail.kernel.org>
2019-10-29  1:06         ` Sudeep Holla
2019-11-05  6:50           ` Viresh Kumar

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).