linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] docs: cpufreq: Frequencies are in Hz, not kHz
@ 2023-02-01 18:11 Douglas Anderson
  2023-02-01 18:41 ` Doug Anderson
  0 siblings, 1 reply; 2+ messages in thread
From: Douglas Anderson @ 2023-02-01 18:11 UTC (permalink / raw)
  To: rafael, viresh.kumar, corbet
  Cc: Douglas Anderson, Rafael J . Wysocki, linux-doc, linux-kernel, linux-pm

Though the documentation for the cpufreq files has always specified
that the frequencies are in kHz, they simply aren't. For as long as I
can remember looking at these files they've always been in straight
Hz. Fix the docs.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
NOTE: git blame shows that this has been wrong since before the kernel
switched to git. I've tagged the first git commit as Fixes, but we
could easily just drop the Fixes tag if that's a better way to go.

 Documentation/admin-guide/pm/cpufreq.rst | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/Documentation/admin-guide/pm/cpufreq.rst b/Documentation/admin-guide/pm/cpufreq.rst
index 6adb7988e0eb..eb46c5983a0a 100644
--- a/Documentation/admin-guide/pm/cpufreq.rst
+++ b/Documentation/admin-guide/pm/cpufreq.rst
@@ -242,7 +242,7 @@ are the following:
 
 ``cpuinfo_cur_freq``
 	Current frequency of the CPUs belonging to this policy as obtained from
-	the hardware (in KHz).
+	the hardware (in Hz).
 
 	This is expected to be the frequency the hardware actually runs at.
 	If that frequency cannot be determined, this attribute should not
@@ -250,11 +250,11 @@ are the following:
 
 ``cpuinfo_max_freq``
 	Maximum possible operating frequency the CPUs belonging to this policy
-	can run at (in kHz).
+	can run at (in Hz).
 
 ``cpuinfo_min_freq``
 	Minimum possible operating frequency the CPUs belonging to this policy
-	can run at (in kHz).
+	can run at (in Hz).
 
 ``cpuinfo_transition_latency``
 	The time it takes to switch the CPUs belonging to this policy from one
@@ -278,7 +278,7 @@ are the following:
 	listed by this attribute.]
 
 ``scaling_cur_freq``
-	Current frequency of all of the CPUs belonging to this policy (in kHz).
+	Current frequency of all of the CPUs belonging to this policy (in Hz).
 
 	In the majority of cases, this is the frequency of the last P-state
 	requested by the scaling driver from the hardware using the scaling
@@ -308,7 +308,7 @@ are the following:
 
 ``scaling_max_freq``
 	Maximum frequency the CPUs belonging to this policy are allowed to be
-	running at (in kHz).
+	running at (in Hz).
 
 	This attribute is read-write and writing a string representing an
 	integer to it will cause a new limit to be set (it must not be lower
@@ -316,7 +316,7 @@ are the following:
 
 ``scaling_min_freq``
 	Minimum frequency the CPUs belonging to this policy are allowed to be
-	running at (in kHz).
+	running at (in Hz).
 
 	This attribute is read-write and writing a string representing a
 	non-negative integer to it will cause a new limit to be set (it must not
@@ -326,7 +326,7 @@ are the following:
 	This attribute is functional only if the `userspace`_ scaling governor
 	is attached to the given policy.
 
-	It returns the last frequency requested by the governor (in kHz) or can
+	It returns the last frequency requested by the governor (in Hz) or can
 	be written to in order to set a new frequency for the policy.
 
 
-- 
2.39.1.456.gfc5497dd1b-goog


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

* Re: [PATCH] docs: cpufreq: Frequencies are in Hz, not kHz
  2023-02-01 18:11 [PATCH] docs: cpufreq: Frequencies are in Hz, not kHz Douglas Anderson
@ 2023-02-01 18:41 ` Doug Anderson
  0 siblings, 0 replies; 2+ messages in thread
From: Doug Anderson @ 2023-02-01 18:41 UTC (permalink / raw)
  To: rafael, viresh.kumar, corbet
  Cc: Rafael J . Wysocki, linux-doc, linux-kernel, linux-pm

Hi,

On Wed, Feb 1, 2023 at 10:11 AM Douglas Anderson <dianders@chromium.org> wrote:
>
> Though the documentation for the cpufreq files has always specified
> that the frequencies are in kHz, they simply aren't. For as long as I
> can remember looking at these files they've always been in straight
> Hz. Fix the docs.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> NOTE: git blame shows that this has been wrong since before the kernel
> switched to git. I've tagged the first git commit as Fixes, but we
> could easily just drop the Fixes tag if that's a better way to go.
>
>  Documentation/admin-guide/pm/cpufreq.rst | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)

Ugh. Please ignore this patch. Somehow I read these numbers many times
and convinced myself that it was Hz enough to actually post a patch.
...but then someone corrected me and pointed out that I'm utterly and
completely wrong. Sorry for the noise.

-Doug

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

end of thread, other threads:[~2023-02-01 18:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-01 18:11 [PATCH] docs: cpufreq: Frequencies are in Hz, not kHz Douglas Anderson
2023-02-01 18:41 ` Doug Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).