linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: cpuidle: don't initialize big.LITTLE driver if MCPM is unavailable
@ 2015-01-08  6:29 Sudeep Holla
  2015-01-08  8:53 ` Daniel Lezcano
  0 siblings, 1 reply; 15+ messages in thread
From: Sudeep Holla @ 2015-01-08  6:29 UTC (permalink / raw)
  To: linux-pm, linux-arm-kernel
  Cc: Sudeep Holla, Lorenzo Pieralisi, Daniel Lezcano,
	Rafael J. Wysocki

If big.LITTLE driver is initialized even when MCPM is unavailable,
we get the below warning the first time cpu tries to enter deeper
C-states.

------------[ cut here ]------------
WARNING: CPU: 4 PID: 0 at kernel/arch/arm/common/mcpm_entry.c:130 mcpm_cpu_suspend+0x6d/0x74()
Modules linked in:
CPU: 4 PID: 0 Comm: swapper/4 Not tainted 3.19.0-rc3-00007-gaf5a2cb1ad5c-dirty #11
Hardware name: ARM-Versatile Express
[<c0013fa5>] (unwind_backtrace) from [<c001084d>] (show_stack+0x11/0x14)
[<c001084d>] (show_stack) from [<c04fe7f1>] (dump_stack+0x6d/0x78)
[<c04fe7f1>] (dump_stack) from [<c0020645>] (warn_slowpath_common+0x69/0x90)
[<c0020645>] (warn_slowpath_common) from [<c00206db>] (warn_slowpath_null+0x17/0x1c)
[<c00206db>] (warn_slowpath_null) from [<c001cbdd>] (mcpm_cpu_suspend+0x6d/0x74)
[<c001cbdd>] (mcpm_cpu_suspend) from [<c03c6919>] (bl_powerdown_finisher+0x21/0x24)
[<c03c6919>] (bl_powerdown_finisher) from [<c001218d>] (cpu_suspend_abort+0x1/0x14)
[<c001218d>] (cpu_suspend_abort) from [<00000000>] (  (null))
---[ end trace d098e3fd00000008 ]---

This patch fixes the issue by checking for the availability of MCPM
before initializing the big.LITTLE cpuidle driver

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
---
 drivers/cpuidle/cpuidle-big_little.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/cpuidle/cpuidle-big_little.c b/drivers/cpuidle/cpuidle-big_little.c
index e3e225fe6b45..40c34faffe59 100644
--- a/drivers/cpuidle/cpuidle-big_little.c
+++ b/drivers/cpuidle/cpuidle-big_little.c
@@ -182,6 +182,10 @@ static int __init bl_idle_init(void)
 	 */
 	if (!of_match_node(compatible_machine_match, root))
 		return -ENODEV;
+
+	if (!mcpm_is_available())
+		return -EUNATCH;
+
 	/*
 	 * For now the differentiation between little and big cores
 	 * is based on the part number. A7 cores are considered little
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [GIT PULL] : cpuidle-big.little fix when mcpm is not available
@ 2015-01-25 14:39 Daniel Lezcano
  2015-01-25 20:53 ` [PATCH] drivers: cpuidle: Don't initialize big.LITTLE driver if MCPM is unavailable Daniel Lezcano
  0 siblings, 1 reply; 15+ messages in thread
From: Daniel Lezcano @ 2015-01-25 14:39 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Sudeep Holla, lorenzo Pieralisi, Linux PM mailing list,
	Linux Kernel Mailing List

Hi Rafael,

This pull request has a single patch which is a fix for the 
cpuidle-big.little driver. If the mcpm backend is not available because 
the CCI is not defined in the DT, the cpuidle driver will 
unconditionally assume it is and call the mcpm functions leading to a 
kernel WARNING.

Sudeep Holla fixed that by checking at the init time the mcpm is 
available before initializing the deeper idle states.

Thanks
   -- Daniel

The following changes since commit ec6f34e5b552fb0a52e6aae1a5afbbb1605cc6cc:

   Linux 3.19-rc5 (2015-01-18 18:02:20 +1200)

are available in the git repository at:

   http://git.linaro.org/people/daniel.lezcano/linux.git cpuidle/3.20

for you to fetch changes up to 194fe6f28e2819d3f50fbed24c3b72f21501dbfa:

   drivers: cpuidle: Don't initialize big.LITTLE driver if MCPM is 
unavailable (2015-01-23 15:05:48 +0100)

----------------------------------------------------------------
Sudeep Holla (1):
       drivers: cpuidle: Don't initialize big.LITTLE driver if MCPM is 
unavailable

  drivers/cpuidle/cpuidle-big_little.c | 4 ++++
  1 file changed, 4 insertions(+)

-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

end of thread, other threads:[~2015-01-25 20:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-08  6:29 [PATCH] drivers: cpuidle: don't initialize big.LITTLE driver if MCPM is unavailable Sudeep Holla
2015-01-08  8:53 ` Daniel Lezcano
2015-01-08  9:16   ` Sudeep Holla
2015-01-08 10:02     ` Daniel Lezcano
2015-01-08 10:31       ` Sudeep Holla
2015-01-08 11:11         ` Daniel Lezcano
2015-01-08 12:29           ` Lorenzo Pieralisi
2015-01-08 14:01             ` Daniel Lezcano
2015-01-08 14:46               ` Lorenzo Pieralisi
2015-01-08 20:27             ` Kevin Hilman
2015-01-08 20:51               ` Daniel Lezcano
2015-01-09 17:34                 ` Kevin Hilman
2015-01-09  4:58               ` Sudeep Holla
2015-01-09  5:01             ` Sudeep Holla
  -- strict thread matches above, loose matches on Subject: below --
2015-01-25 14:39 [GIT PULL] : cpuidle-big.little fix when mcpm is not available Daniel Lezcano
2015-01-25 20:53 ` [PATCH] drivers: cpuidle: Don't initialize big.LITTLE driver if MCPM is unavailable Daniel Lezcano

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