Skip to contentSkip to conversation

cpufreq: intel_pstate: wrong call to acpi_processor_unregister_performance

PATCH Superseded Srinivas Pandruvada 2 participants 3 messages Nov 14, 2015 – Nov 16, 2015

Subsystems (2)
lore
Share & tools
lore

Srinivas Pandruvada

author maintainer
#0 lore raw

PATCH v3 1/1 cpufreq: intel_pstate: wrong call to acpi_processor_unregister_performance

v3: Change the commit log to be more clear.

v2: Fix as suggested by Rafael

Srinivas Pandruvada (1):
cpufreq: intel_pstate: wrong call to
acpi_processor_unregister_performance

 drivers/cpufreq/intel_pstate.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
Signature · 1 line
2.4.3
author maintainer
#1 lore raw

PATCH v3 1/1 cpufreq: intel_pstate: wrong call to acpi_processor_unregister_performance

When the no_acpi_perf is set to 1, that means that we haven't called acpi_processor_register_performance(), so we shouldn't also call acpi_processor_unregister_performance in intel_pstate_exit_perf_limits().

---
 drivers/cpufreq/intel_pstate.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/cpufreq/intel_pstate.c +1 -5
index 6ec39ef..bad1ee3 100644
@@ -326,13 +326,9 @@ static int intel_pstate_init_perf_limits(struct cpufreq_policy *policy)
 
 static int intel_pstate_exit_perf_limits(struct cpufreq_policy *policy)
 {
-	struct cpudata *cpu;
-
 	if (!no_acpi_perf)
-		return 0;
+		acpi_processor_unregister_performance(policy->cpu);
 
-	cpu = all_cpu_data[policy->cpu];
-	acpi_processor_unregister_performance(policy->cpu);
 	return 0;
 }
 
Signature · 1 line
2.4.3
#2 lore raw
Quoted 5 lines · Srinivas Pandruvada

When the no_acpi_perf is set to 1, that means that we haven't called acpi_processor_register_performance(), so we shouldn't also call acpi_processor_unregister_performance in intel_pstate_exit_perf_limits().

OK, but this is my patch. :-)

I'll apply it with the right From: line.

Quoted 14 lines
---
 drivers/cpufreq/intel_pstate.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/cpufreq/intel_pstate.c +0 -1
index 6ec39ef..bad1ee3 100644
@@ -326,13 +326,9 @@ static int intel_pstate_init_perf_limits(struct cpufreq_policy *policy)
 
 static int intel_pstate_exit_perf_limits(struct cpufreq_policy *policy)
 {
-	struct cpudata *cpu;

drivers/cpufreq/intel_pstate.c static int intel_pstate_init_perf_limits(struct cpufreq_policy *policy) · line 334

Quoted 10 lines
drivers/cpufreq/intel_pstate.c +1 -4
-
 	if (!no_acpi_perf)
-		return 0;
+		acpi_processor_unregister_performance(policy->cpu);
 
-	cpu = all_cpu_data[policy->cpu];
-	acpi_processor_unregister_performance(policy->cpu);
 	return 0;
 }
 

Thanks,
Rafael