public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpufreq: acpi: Add comment under ACPI_ADR_SPACE_SYSTEM_IO case
@ 2013-10-12  1:36 Viresh Kumar
  2013-10-12 13:38 ` Rafael J. Wysocki
  0 siblings, 1 reply; 9+ messages in thread
From: Viresh Kumar @ 2013-10-12  1:36 UTC (permalink / raw)
  To: rjw; +Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	Viresh Kumar

policy->cur is now set by cpufreq core when cpufreq_driver->get() is defined and
so drivers aren't required to set it. When space_id is ACPI_ADR_SPACE_SYSTEM_IO
for acpi cpufreq driver it doesn't set ->get to a valid function pointer and so
policy->cur is required to be set by driver.

This is already followed in acpi-cpufreq driver. This patch adds a comment
describing why we need to set policy->cur from driver.

Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
This change was requested by Rafael here:
http://www.spinics.net/lists/linux-acpi/msg46748.html

 drivers/cpufreq/acpi-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index a8dac7b..8ecd74e 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -838,6 +838,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
 	switch (perf->control_register.space_id) {
 	case ACPI_ADR_SPACE_SYSTEM_IO:
 		/* Current speed is unknown and not detectable by IO port */
+		/* ->cur wouldn't be set by core as ->get() is NULL */
 		policy->cur = acpi_cpufreq_guess_freq(data, policy->cpu);
 		break;
 	case ACPI_ADR_SPACE_FIXED_HARDWARE:
-- 
1.7.12.rc2.18.g61b472e


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-10-22 22:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-12  1:36 [PATCH] cpufreq: acpi: Add comment under ACPI_ADR_SPACE_SYSTEM_IO case Viresh Kumar
2013-10-12 13:38 ` Rafael J. Wysocki
2013-10-12 15:28   ` Viresh Kumar
2013-10-12 20:41     ` Rafael J. Wysocki
2013-10-13  0:37       ` Viresh Kumar
2013-10-21  7:13         ` Viresh Kumar
2013-10-21 22:39           ` Rafael J. Wysocki
2013-10-22  0:42             ` Viresh Kumar
2013-10-22 22:08               ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox