]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: Preserve sysfs files across suspend/resume
authorSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Wed, 15 May 2013 19:47:17 +0000 (21:47 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 15 May 2013 19:47:17 +0000 (21:47 +0200)
commitb7ecc670b5964f9222b7c980fd6c088572055a6a
treebd4ffaa7b2b1f93007ae73eaa090c54b50c1f161
parent26a4e6456574dd0a797d9322921386dca9b32c97
cpufreq: Preserve sysfs files across suspend/resume

The file permissions of cpufreq per-cpu sysfs files are not preserved
across suspend/resume because we internally go through the CPU
Hotplug path which reinitializes the file permissions on CPU online.

But the user is not supposed to know that we are using CPU hotplug
internally within suspend/resume (IOW, the kernel should not silently
wreck the user-set file permissions across a suspend cycle).
Therefore, we need to preserve the file permissions as they are
across suspend/resume.

The simplest way to achieve that is to just not touch the sysfs files
at all - ie., just ignore the CPU hotplug notifications in the
suspend/resume path (_FROZEN) in the cpufreq hotplug callback.

Reported-by: Robert Jarzmik <robert.jarzmik@intel.com>
Reported-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c
drivers/cpufreq/cpufreq_stats.c