ARM: tegra11x: Fix time accounting in power down
Bo Yan [Thu, 14 Feb 2013 17:53:24 +0000 (09:53 -0800)]
Include the time of Fmin@Vmin state in the time spent in power down.
After this change, the time spent in cpu powered down state as
reported by kernel cpuidle infrastructure will also include time
spent in Fmin@Vmin state. This makes sense because Fmin@Vmin currently
is implemented as a sub-state of "cpu powered down".

bug 1235206

Change-Id: I94b3829f70ebcefe6741e9f0d8c92936705f229c
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: http://git-master/r/201054
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>

arch/arm/mach-tegra/cpuidle-t11x.c

index 2f06029..b87731d 100644 (file)
@@ -3,7 +3,7 @@
  *
  * CPU idle driver for Tegra11x CPUs
  *
- * Copyright (c) 2012-2013, NVIDIA Corporation.
+ * Copyright (c) 2012-2013, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -513,7 +513,7 @@ bool tegra11x_idle_power_down(struct cpuidle_device *dev,
                        idle_stats.clk_gating_vmin++;
                        cpu_do_idle();
                        tegra11_cpu_dfll_rate_exchange(&rate);
-                       power_down = false;
+                       power_down = true;
                } else
                        power_down = tegra_cpu_core_power_down(dev, state,
                                                                request);