[3.13.y.z extended stable] Patch "intel_pstate: Don't lose sysfs settings during cpu offline" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Fri Oct 31 20:53:43 UTC 2014

This is a note to let you know that I have just added a patch titled

    intel_pstate: Don't lose sysfs settings during cpu offline

to the linux-3.13.y-queue branch of the 3.13.y.z extended stable tree 
which can be found at:


This patch is scheduled to be released in version

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.13.y.z tree, see



>From 35097140c24a58ef2d10e4041b87413f959d270b Mon Sep 17 00:00:00 2001
From: Dirk Brandewie <dirk.j.brandewie at intel.com>
Date: Mon, 13 Oct 2014 08:37:42 -0700
Subject: intel_pstate: Don't lose sysfs settings during cpu offline

commit c034871712730a33e0267095f48b62eae958499c upstream.

The user may have custom settings don't destroy them during suspend.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=80651
Reported-by: Tobias Jakobi <liquid.acid at gmx.net>
Signed-off-by: Dirk Brandewie <dirk.j.brandewie at intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki at intel.com>
[ kamal: backport to 3.13-stable: context ]
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
 drivers/cpufreq/intel_pstate.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 7d622cd..4469fed 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -711,7 +711,9 @@ static int intel_pstate_init_cpu(unsigned int cpunum)
 	if (!id)
 		return -ENODEV;

-	all_cpu_data[cpunum] = kzalloc(sizeof(struct cpudata), GFP_KERNEL);
+	if (!all_cpu_data[cpunum])
+		all_cpu_data[cpunum] = kzalloc(sizeof(struct cpudata),
+					       GFP_KERNEL);
 	if (!all_cpu_data[cpunum])
 		return -ENOMEM;

@@ -799,8 +801,6 @@ static int intel_pstate_cpu_exit(struct cpufreq_policy *policy)
 	int cpu = policy->cpu;

-	kfree(all_cpu_data[cpu]);
-	all_cpu_data[cpu] = NULL;
 	return 0;


More information about the kernel-team mailing list