aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/power
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-11-26 22:39:42 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-28 08:47:31 -0500
commit5a87182aa21d6d5d306840feab9321818dd3e2a3 (patch)
tree86ead8ebc52067f57ec2f78271fa5dbe9c58e066 /drivers/base/power
parent3d3c6f54bccf0a621682d17e25cf22895a0c6e5a (diff)
cpufreq: suspend governors on system suspend/hibernate
This patch adds cpufreq suspend/resume calls to dpm_{suspend|resume}_noirq() for handling suspend/resume of cpufreq governors. Lan Tianyu (Intel) & Jinhyuk Choi (Broadcom) found anr issue where tunables configuration for clusters/sockets with non-boot CPUs was getting lost after suspend/resume, as we were notifying governors with CPUFREQ_GOV_POLICY_EXIT on removal of the last cpu for that policy and so deallocating memory for tunables. This is fixed by this patch as we don't allow any operation on governors after device suspend and before device resume now. Reported-and-tested-by: Lan Tianyu <tianyu.lan@intel.com> Reported-by: Jinhyuk Choi <jinchoi@broadcom.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> [rjw: Changelog, minor cleanups] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/power')
-rw-r--r--drivers/base/power/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 9f098a82cf04..10c3510d72a9 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -29,6 +29,7 @@
29#include <linux/async.h> 29#include <linux/async.h>
30#include <linux/suspend.h> 30#include <linux/suspend.h>
31#include <trace/events/power.h> 31#include <trace/events/power.h>
32#include <linux/cpufreq.h>
32#include <linux/cpuidle.h> 33#include <linux/cpuidle.h>
33#include "../base.h" 34#include "../base.h"
34#include "power.h" 35#include "power.h"
@@ -473,6 +474,7 @@ static void dpm_resume_noirq(pm_message_t state)
473 dpm_show_time(starttime, state, "noirq"); 474 dpm_show_time(starttime, state, "noirq");
474 resume_device_irqs(); 475 resume_device_irqs();
475 cpuidle_resume(); 476 cpuidle_resume();
477 cpufreq_resume();
476} 478}
477 479
478/** 480/**
@@ -885,6 +887,7 @@ static int dpm_suspend_noirq(pm_message_t state)
885 ktime_t starttime = ktime_get(); 887 ktime_t starttime = ktime_get();
886 int error = 0; 888 int error = 0;
887 889
890 cpufreq_suspend();
888 cpuidle_pause(); 891 cpuidle_pause();
889 suspend_device_irqs(); 892 suspend_device_irqs();
890 mutex_lock(&dpm_list_mtx); 893 mutex_lock(&dpm_list_mtx);