Skip to contentSkip to conversation

Print _PPC changes via cpufreq debug layer

PATCH New Thomas Renninger 1 participant 1 message Oct 31, 2007 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Print _PPC changes via cpufreq debug layer

Ferdinand, you might want to give this one a try.
With CPU_FREQ_DEBUG set and cpufreq core debug enabled you should see _PPC value changes. As soon as the value is not 0, you could be rather sure the limitation comes from there...

Dave, Len: Can this be added, pls.
Testcompiled with CPU freq enabled/disabled and cpufreq debug enabled/disabled on x86_64.

Thanks,

Thomas

----------------------------

Print _PPC changes via cpufreq debug layer

---
 drivers/acpi/processor_perflib.c |    7 +++++++
 1 file changed, 7 insertions(+)
drivers/acpi/processor_perflib.c +7 -0
Index: cpufreq/drivers/acpi/processor_perflib.c
===================================================================
@@ -50,6 +50,10 @@ ACPI_MODULE_NAME("processor_perflib");
 
 static DEFINE_MUTEX(performance_mutex);
 
+/* Use cpufreq debug layer for _PPC changes. */
+#define cpufreq_printk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_CORE, \
+						"cpufreq-core", msg)
+
 /*
  * _PPC support is implemented as a CPUfreq policy notifier:
  * This means each time a CPUfreq driver registered also with
@@ -123,6 +127,9 @@ static int acpi_processor_get_platform_l
 		return -ENODEV;
 	}
 
+	cpufreq_printk("CPU %d: _PPC is %d - frequency %s limited\n", pr->id,
+		       (int)ppc, ppc ? "" : "not");
+
 	pr->performance_platform_limit = (int)ppc;
 
 	return 0;