linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC v1 0/8] drivers: qcom: Add cpu power domain  for SDM845
@ 2018-10-10 21:20 Raju P.L.S.S.S.N
  2018-10-10 21:20 ` [PATCH RFC v1 1/8] PM / Domains: Add helper functions to attach/detach CPUs to/from genpd Raju P.L.S.S.S.N
                   ` (7 more replies)
  0 siblings, 8 replies; 43+ messages in thread
From: Raju P.L.S.S.S.N @ 2018-10-10 21:20 UTC (permalink / raw)
  To: andy.gross, david.brown, rjw, ulf.hansson, khilman,
	linux-arm-msm, linux-soc
  Cc: rnayak, bjorn.andersson, linux-kernel, linux-pm, devicetree,
	sboyd, evgreen, dianders, mka, ilina, Raju P.L.S.S.S.N

Changes in v2:
 - Create a cpu pm domain for CPUs based on Ulf Hansson's patches[5][6].
   The reference count to determine the last CPU in the system to enter
   low power mode would be taken care by genpd. The domain power off
   callback is used to perform the last-man activities.

Please note: the first three patches in this series  are taken from Ulf
Hansoon's series[8] and included here for context and completeness of
present series. They would be merged as part of their series[8].

Hi,

This is an attempt at a solution to perform activities necessary while
entering deeper low power modes supported by firmware for QCOM SoCs which
have hardened IP (Resource Power Manager Hardened - RPMH) for shared
resource management.

The shared resources that are no longer used, when processor enters deep
idle states, can be turned off or put to lower state via sleep requests.
Clients vote for lower resource state when application processor is asleep.
These votes need to be flushed only during entry to low power modes.

In addition to this, an always-on power domain wake-up timer present in PDC
(Power Domain Controller)  needs to be programmed so that RSC is up and
running by the time CPU has to wake-up. 

The kernel does not notify that the CPU powering down is the last CPU.
Therefore, in this version, we are using genpd framework based on Ulf
Hansoon's approach for reference counting to determine the last CPU in
the system to enter idle and use that to perform the last-man activities.
It would be optimal to do this than to flush whenever a core enters idle.
The current approach can be revisited in future if OS-initiated support
becomes available that enables certain actions to be taken when last core
enters deepest low power mode.

Please review these patches. Your inputs would be greatly appreciated.

Thanks,
Raju

---
Dependencies:

The current series depends on patches[1][2][3][4], which add RPMH
communication support, to send shared resource request votes by clients.
The patches[1][2][3][4] also provide functions that are expected to be
called by domain manager during low power mode entry. Apart from RPMH
related patches, the current series depends on attaching CPU devices to
genpd framework[5][6] & knowing the next wake up timer of a CPU[7] for
programing the always-on timer present in PDC


[1]. https://patchwork.kernel.org/patch/10589385/
[2]. https://patchwork.kernel.org/patch/10575721/
[3]. https://patchwork.kernel.org/project/linux-arm-msm/list/?series=26079
[4]. https://patchwork.kernel.org/project/linux-arm-msm/list/?series=28381
[5]. https://patchwork.kernel.org/patch/10478167/
[6]. https://patchwork.kernel.org/patch/10478153/
[7]. https://patchwork.kernel.org/patch/10478021/
[8]. https://lkml.org/lkml/2018/6/20/807

Lina Iyer (1):
  timer: Export next wakeup time of a CPU

Raju P.L.S.S.S.N (5):
  drivers: qcom: cpu_pd: add cpu power domain support using genpd
  dt-bindings: introduce cpu power domain bindings for Qualcomm SoCs
  drivers: qcom: cpu_pd: program next wakeup to PDC timer
  drivers: qcom: cpu_pd: Handle cpu hotplug in the domain
  arm64: dtsi: sdm845: Add cpu power domain support

Ulf Hansson (2):
  PM / Domains: Add helper functions to attach/detach CPUs to/from genpd
  kernel/cpu_pm: Manage runtime PM in the idle path for CPUs

 .../bindings/soc/qcom/cpu_power_domain.txt         |  39 ++++
 arch/arm64/boot/dts/qcom/sdm845.dtsi               |  13 ++
 drivers/base/power/domain.c                        |  70 ++++++++
 drivers/soc/qcom/Kconfig                           |   9 +
 drivers/soc/qcom/Makefile                          |   1 +
 drivers/soc/qcom/cpu_pd.c                          | 200 +++++++++++++++++++++
 include/linux/cpuhotplug.h                         |   1 +
 include/linux/pm_domain.h                          |   9 +
 include/linux/tick.h                               |   8 +
 kernel/cpu_pm.c                                    |  11 ++
 kernel/time/tick-sched.c                           |  10 ++
 11 files changed, 371 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/qcom/cpu_power_domain.txt
 create mode 100644 drivers/soc/qcom/cpu_pd.c

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of the Code Aurora Forum, hosted by The Linux Foundation.


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

end of thread, other threads:[~2018-10-30 10:30 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-10 21:20 [PATCH RFC v1 0/8] drivers: qcom: Add cpu power domain for SDM845 Raju P.L.S.S.S.N
2018-10-10 21:20 ` [PATCH RFC v1 1/8] PM / Domains: Add helper functions to attach/detach CPUs to/from genpd Raju P.L.S.S.S.N
2018-10-10 21:20 ` [PATCH RFC v1 2/8] kernel/cpu_pm: Manage runtime PM in the idle path for CPUs Raju P.L.S.S.S.N
2018-10-11 20:52   ` Rafael J. Wysocki
2018-10-11 22:08     ` Lina Iyer
2018-10-12  7:43       ` Rafael J. Wysocki
2018-10-12 10:20         ` Ulf Hansson
2018-10-12 15:20         ` Lina Iyer
2018-10-10 21:20 ` [PATCH RFC v1 3/8] timer: Export next wakeup time of a CPU Raju P.L.S.S.S.N
2018-10-29 22:36   ` Thomas Gleixner
2018-10-30 10:29     ` Ulf Hansson
2018-10-10 21:20 ` [PATCH RFC v1 4/8] drivers: qcom: cpu_pd: add cpu power domain support using genpd Raju P.L.S.S.S.N
2018-10-11 11:13   ` Sudeep Holla
2018-10-11 15:27     ` Ulf Hansson
2018-10-11 15:59       ` Sudeep Holla
2018-10-12  9:23         ` Ulf Hansson
2018-10-12 14:33   ` Sudeep Holla
2018-10-12 18:01     ` Raju P L S S S N
2018-10-10 21:20 ` [PATCH RFC v1 5/8] dt-bindings: introduce cpu power domain bindings for Qualcomm SoCs Raju P.L.S.S.S.N
2018-10-11 11:08   ` Sudeep Holla
2018-10-12 18:08     ` Raju P L S S S N
2018-10-10 21:20 ` [PATCH RFC v1 6/8] drivers: qcom: cpu_pd: program next wakeup to PDC timer Raju P.L.S.S.S.N
2018-10-10 21:20 ` [PATCH RFC v1 7/8] drivers: qcom: cpu_pd: Handle cpu hotplug in the domain Raju P.L.S.S.S.N
2018-10-11 11:20   ` Sudeep Holla
2018-10-11 16:00     ` Lina Iyer
2018-10-11 16:19       ` Sudeep Holla
2018-10-11 16:58         ` Lina Iyer
2018-10-11 17:37           ` Sudeep Holla
2018-10-11 21:06             ` Lina Iyer
2018-10-12 15:04               ` Sudeep Holla
2018-10-12 15:46                 ` Ulf Hansson
2018-10-12 16:16                   ` Lina Iyer
2018-10-12 16:33                   ` Sudeep Holla
2018-10-12 16:04                 ` Lina Iyer
2018-10-12 17:00                   ` Sudeep Holla
2018-10-12 17:19                     ` Lina Iyer
2018-10-12 17:25                       ` Sudeep Holla
2018-10-22 19:50                         ` Lina Iyer
2018-10-12 14:25   ` Sudeep Holla
2018-10-12 18:10     ` Raju P L S S S N
2018-10-10 21:20 ` [PATCH RFC v1 8/8] arm64: dtsi: sdm845: Add cpu power domain support Raju P.L.S.S.S.N
2018-10-12 17:35   ` Sudeep Holla
2018-10-12 17:52     ` Lina Iyer

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