public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pcc-cpufreq driver update default value of cpuinfo_transition_latency
@ 2015-11-19 15:29 Jacob Tanenbaum
  2015-11-20  1:58 ` Viresh Kumar
  0 siblings, 1 reply; 3+ messages in thread
From: Jacob Tanenbaum @ 2015-11-19 15:29 UTC (permalink / raw)
  To: linux-pm; +Cc: corbet, rjw, viresh.kumar, prarit, Jacob Tanenbaum

The cpufreq documentation specifies

policy->cpuinfo.transition_latency   the time it takes on this CPU to
                                switch between two frequencies in
                                nanoseconds (if appropriate, else
                                specify CPUFREQ_ETERNAL)

currently pcc-cpufreq does not expose the value and sets it to zero. I
changed the pcc-cpufreq driver and it's documentation to conform to the
default value specified in Documentation/cpu-freq/cpu-drivers.txt

Signed-off-by: Jacob Tanenbaum <jtanenba@redhat.com>
---
 Documentation/cpu-freq/pcc-cpufreq.txt | 4 ++--
 drivers/cpufreq/pcc-cpufreq.c          | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/cpu-freq/pcc-cpufreq.txt b/Documentation/cpu-freq/pcc-cpufreq.txt
index 9e3c3b3..0a94224 100644
--- a/Documentation/cpu-freq/pcc-cpufreq.txt
+++ b/Documentation/cpu-freq/pcc-cpufreq.txt
@@ -159,8 +159,8 @@ to be strictly associated with a P-state.
 
 2.2 cpuinfo_transition_latency:
 -------------------------------
-The cpuinfo_transition_latency field is 0. The PCC specification does
-not include a field to expose this value currently.
+The cpuinfo_transition_latency field is CPUFREQ_ETERNAL. The PCC specification
+does not include a field to expose this value currently.
 
 2.3 cpuinfo_cur_freq:
 ---------------------
diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c
index 2a0d589..808a320 100644
--- a/drivers/cpufreq/pcc-cpufreq.c
+++ b/drivers/cpufreq/pcc-cpufreq.c
@@ -555,6 +555,8 @@ static int pcc_cpufreq_cpu_init(struct cpufreq_policy *policy)
 	policy->min = policy->cpuinfo.min_freq =
 		ioread32(&pcch_hdr->minimum_frequency) * 1000;
 
+	policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
+
 	pr_debug("init: policy->max is %d, policy->min is %d\n",
 		policy->max, policy->min);
 out:
-- 
2.4.3


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

end of thread, other threads:[~2015-12-14 23:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-19 15:29 [PATCH] pcc-cpufreq driver update default value of cpuinfo_transition_latency Jacob Tanenbaum
2015-11-20  1:58 ` Viresh Kumar
2015-12-14 23:57   ` 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