Commit Graph

11 Commits

Author SHA1 Message Date
Murali Nalajala 16323e6eef cpu_pm: Add level to the cluster pm notification
Cluster pm notifications without level information increases difficulty
and complexity for the registered drivers to figure out when the last
coherency level is going into power collapse.

Send notifications with level information that allows the registered
drivers to easily determine the cluster level that is going in/out of
power collapse.

There is an issue with this implementation. GIC driver saves and
restores the distributed registers as part of cluster notifications. On
newer platforms there are multiple cluster levels are defined (e.g l2,
cci etc). These cluster level notofications can happen independently.
On MSM platforms GIC is still active while the cluster sleeps in idle,
causing the GIC state to be overwritten with an incorrect previous state
of the interrupts. This leads to a system hang. Do not save and restore
on any L2 and higher cache coherency level sleep entry and exit.

Change-Id: I31918d6383f19e80fe3b064cfaf0b55e16b97eb6
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
2015-01-07 22:31:58 -08:00
Srinivas Rao L 1fd2a2caaf msm: lpm-levels: Initialize last level for cluster at probe
Cluster lpm's last executed level info needs to be initialized at probe.
This data when left uninitialized would result in the top level cluster
having an incorrect, lpm state, view of a child cluster. This incorrect
view could result in one of the following race conditions. CCI could be
programmed to enter a low power mode even though one of the cores is
online. RPM SPM interrupt may be masked by a core that is not the last
core in the system.

Change-Id: I663da7e9b5972ed572546c0d87ce8851ecf8e56b
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
2014-12-22 09:47:30 -08:00
Linux Build Service Account ef21ffcfcc Merge "msm: lpm: Add support for registering lpm clock gating mode" 2014-10-22 15:58:05 -07:00
Murali Nalajala e6ac510186 msm: lpm-levels-of: fix accessing out of bound memory
CPU's lpm level kobjects are dynamically allocated based on the
number of CPU's in that cluster. The kobject's are then indexed
using the cpu number. This results in the driver writing to and
using memory not allocated to it. Fix this by using an index
starting from zero to index into the allocated kobject array.

CRs-fixed: 739886
Change-Id: I033590c89ad800087007ed6ba60fe558c2221767
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
2014-10-17 15:59:47 -07:00
Karthik Parsha 455347d19f msm: lpm: Add support for registering lpm clock gating mode
An SPM is able to support Clock Gating along with the other low power
modes. Add support for parsing clock gating lpm mode in the lpm driver.

Change-Id: Idac6f7d415cfbe9490aef5c7933d72626e15acae
Signed-off-by: Karthik Parsha <kparsha@codeaurora.org>
2014-10-14 10:35:22 -07:00
Venkat Devarasetty c80cf034c0 msm: lpm-levels-of: avoid NULL pointer dereference
Cpu node name is printed in error case when its matching
node is not found. If cpu_node is NULL we must avoid its
dereference. Move the print statement so that it is not
accessed when cpu node variable is NULL.

Change-Id: I373d668403c61e9fce76d1d5b4d0f225fa277d16
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
2014-08-01 18:53:07 +05:30
Venkat Devarasetty b3cee487aa Revert "msm: add default enable mode option for lpm levels"
This reverts commit b774cded4a.
Change is no more needed as 8939 boots with all low power modes
enabled by default.

Change-Id: Ia70c0f1974c01086ea18bba8015925528bdd4c48
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
2014-06-09 15:28:09 +05:30
Venkat Devarasetty b774cded4a msm: add default enable mode option for lpm levels
With cluster architecture changes all lpm modes are
enabled at boot. There are crashes at boot when all
lpms are enabled at boot. Add an option to enable
only selected modes at boot up.

Change-Id: Iebeab667aad8d12926b7a3a92deb8ca47c68bfb3
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
2014-06-06 13:03:13 +05:30
Praveen Chidambaram dfbc6bef45 msm: lpm_levels: Allow enable/disable LPM for cpus and clusters
Add sysfs interface to allow/disallow low power modes. Every level
specified in the Devicetree for each cpu and cluster will have an
idle_enabled and suspend_enabled option that controls the availability of
the low power mode for CPUIdle and HOTPLUG/Suspend frameworks.

Change-Id: Ic27f3a586eb9992c611411d2a13365b909ae48a3
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
2014-05-22 09:28:51 -06:00
Praveen Chidambaram 1ade5c364e msm: lpm: Support cluster low power modes for cpu hotplug
When all cpus in any cluster are powered down, we would want to do cluster
low power modes and save power draw by devices like L2, associated with the
cluster. Also, bubble up and allow low power modes on top level clusters.

Change-Id: I68bc2ccbb3cff884da9356ef9aad88d5c2207c10
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
2014-05-20 18:55:00 -06:00
Mahesh Sivasubramanian 0bae66c38a msm: lpm-levels: Support for cluster power management
Add power management support for multilevel cluster. The code is redesigned
to support low power modes with multiple hierarchies of clusters.

Change-Id: I0d0142e53bf2fe6152e7791f09bcb4d35a82e461
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
2014-05-20 18:54:35 -06:00