Skip to contentSkip to conversation

acpi-cpufreq: force transitions even if driver thinks CPU is already at given P-State

PATCH New Dominik Brodowski 1 participant 1 message Oct 8, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acpi-cpufreq: force transitions even if driver thinks CPU is already at given P-State

[applies on top of bk-cpufreq and the 34 patches already pushed]

As it isn't possible to determine whether the P-state last set is still the one currently active in the platform, transitions shouldn't abort because the driver thinks the CPU is already at the target state. Also, it is good to know with what status a transition failed, so print out that value -- that snipped is from Venkates Pallipadi in his test patch for bug # 3507.

arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +1 -7
diff -ruN linux-original/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c linux/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -118,12 +118,6 @@
 		return (-EAGAIN);
 	}
 	
-	if (state == data->acpi_data.state) {
-		dprintk("Already at target state (P%d)\n", state);
-		retval = 0;
-		goto migrate_end;
-	}
-
 	dprintk("Transitioning from P%d to P%d\n",
 		data->acpi_data.state, state);
 
@@ -187,7 +181,7 @@
 		cpufreq_freqs.old = tmp;
 		cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_PRECHANGE);
 		cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_POSTCHANGE);
-		printk(KERN_WARNING "acpi-cpufreq: Transition failed\n");
+		printk(KERN_WARNING "acpi-cpufreq: Transition failed with status 0x%x\n", value);
 		retval = -ENODEV;
 		goto migrate_end;
 	}