diff options
author | ru <ru@FreeBSD.org> | 2005-02-13 21:29:28 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2005-02-13 21:29:28 +0000 |
commit | 82553c54f9f353995cc6916c93a484782daeefd2 (patch) | |
tree | 240787e4d26d1750a25f88c583a5c31be21142d2 /share/man | |
parent | e256a3604ad04763c9aabd09dd830a7ecc24e40d (diff) | |
download | FreeBSD-src-82553c54f9f353995cc6916c93a484782daeefd2.zip FreeBSD-src-82553c54f9f353995cc6916c93a484782daeefd2.tar.gz |
mdoc(7) review.
(I thought Nate has committed it long ago, apparently not.)
Diffstat (limited to 'share/man')
-rw-r--r-- | share/man/man4/cpufreq.4 | 110 |
1 files changed, 48 insertions, 62 deletions
diff --git a/share/man/man4/cpufreq.4 b/share/man/man4/cpufreq.4 index 77d8871..82d04d3 100644 --- a/share/man/man4/cpufreq.4 +++ b/share/man/man4/cpufreq.4 @@ -35,22 +35,11 @@ .Pp .In sys/cpu.h .Ft int -.Fo cpufreq_levels -.Fa "device_t dev" -.Fa "struct cf_level *levels" -.Fa "int *count" -.Fc +.Fn cpufreq_levels "device_t dev" "struct cf_level *levels" "int *count" .Ft int -.Fo cpufreq_set -.Fa "device_t dev" -.Fa "const struct cf_level *level" -.Fa "int priority" -.Fc +.Fn cpufreq_set "device_t dev" "const struct cf_level *level" "int priority" .Ft int -.Fo cpufreq_get -.Fa "device_t dev" -.Fa "struct cf_level *level" -.Fc +.Fn cpufreq_get "device_t dev" "struct cf_level *level" .Ft int .Fo cpufreq_drv_settings .Fa "device_t dev" @@ -59,15 +48,9 @@ .Fa "int *type" .Fc .Ft int -.Fo cpufreq_drv_set -.Fa "device_t dev" -.Fa "const struct cf_setting *set" -.Fc +.Fn cpufreq_drv_set "device_t dev" "const struct cf_setting *set" .Ft int -.Fo cpufreq_drv_get -.Fa "device_t dev" -.Fa "struct cf_setting *set" -.Fc +.Fn cpufreq_drv_get "device_t dev" "struct cf_setting *set" .Sh DESCRIPTION The .Nm @@ -85,9 +68,9 @@ that it should switch settings when the AC line state changes via These settings may be overridden by kernel drivers requesting alternate settings. If this occurs, the original values will be restored once the condition -has passed (e.g., the system has cooled sufficiently.) -If a sysctl can't be set due to an override condition, it will return -EPERM. +has passed (e.g., the system has cooled sufficiently). +If a sysctl cannot be set due to an override condition, it will return +.Er EPERM . .Bl -tag -width indent .It Va dev.cpu.%d.freq Current active CPU frequency in MHz. @@ -108,10 +91,10 @@ ACPI CPU performance states Intel SpeedStep for ICH .El .Pp -.Bl -tag -compact -width ".Xr acpi_throttle 4" The following device drivers offer relative frequency control and have an additive effect: .Pp +.Bl -tag -compact -width ".Xr acpi_throttle 4" .It Xr acpi_throttle 4 ACPI CPU throttling .El @@ -132,59 +115,62 @@ Each level may actually reference more than one .Nm driver but kernel components do not need to be aware of this. The -.Vt total_set +.Va total_set element of -.Vt struct cf_level +.Vt "struct cf_level" provides a summary of the frequency and power for this level. Unknown or irrelevant values are set to -.Vt CPUFREQ_VAL_UNKNOWN . +.Dv CPUFREQ_VAL_UNKNOWN . .Pp The -.Fn cpufreq_levels +.Fn cpufreq_levels method takes a .Nm device and an empty array of -.Ar levels . +.Fa levels . The -.Ar count +.Fa count value should be set to the number of levels available and after the function completes, will be set to the actual number of levels returned. If there are more levels than -.Ar count -will allow, it should return E2BIG. +.Fa count +will allow, it should return +.Er E2BIG . .Pp The -.Fn cpufreq_get +.Fn cpufreq_get method takes a pointer to space to store a -.Ar level . +.Fa level . After successful completion, the output will be the current active level and is equal to one of the levels returned by .Fn cpufreq_levels . .Pp The -.Fn cpufreq_set +.Fn cpufreq_set method takes a pointer a -.Ar level +.Fa level and attempts to activate it. The -.Ar priority -(i.e., CPUFREQ_PRIO_KERN) +.Fa priority +(i.e., +.Dv CPUFREQ_PRIO_KERN ) tells .Nm whether to override previous settings while activating this level. If -.Ar priority +.Fa priority is higher than the current active level, that level will be saved and overridden with the new level. If .Fn cpufreq_set -is called with a NULL -.Ar level , +is called with a +.Dv NULL +.Fa level , the saved level (if any) will be restored. If -.Ar priority +.Fa priority is lower than the current active level's priority, this method returns -EPERM. +.Er EPERM . .Sh DRIVER INTERFACE Kernel drivers offering hardware-specific CPU frequency control export their individual settings through the @@ -203,9 +189,9 @@ framework. The .Fn cpufreq_drv_settings method returns an array of currently available settings, each of type -.Vt struct cf_setting . +.Vt "struct cf_setting" . The driver should set unknown or irrelevant values to -.Vt CPUFREQ_VAL_UNKNOWN . +.Dv CPUFREQ_VAL_UNKNOWN . All the following elements for each setting should be returned: .Bd -literal struct cf_setting { @@ -218,31 +204,32 @@ struct cf_setting { .Ed .Pp On entry to this method, -.Ar count +.Fa count contains the number of settings that can be returned. On successful completion, the driver sets it to the actual number of settings returned. If the driver offers more settings than -.Ar count -will allow, it should return E2BIG. +.Fa count +will allow, it should return +.Er E2BIG . The driver sets -.Ar type +.Fa type to the type of settings it offers, either -.Vt CPUFREQ_TYPE_ABSOLUTE +.Dv CPUFREQ_TYPE_ABSOLUTE or -.Vt CPUFREQ_TYPE_RELATIVE . +.Dv CPUFREQ_TYPE_RELATIVE . .Pp The .Fn cpufreq_drv_set method takes a driver setting and makes it active. If the setting is invalid or not currently available, it should return -EINVAL. +.Er EINVAL . .Pp The .Fn cpufreq_drv_get method returns the currently-active driver setting. The -.Vt struct cf_setting +.Vt "struct cf_setting" returned must be valid for passing to .Fn cpufreq_drv_set , including all elements being filled out correctly. @@ -250,7 +237,12 @@ If the driver cannot infer the current setting (even by estimating it with .Fn cpu_est_clockrate ) then it should set all elements to -.Vt CPUFREQ_VAL_UNKNOWN . +.Dv CPUFREQ_VAL_UNKNOWN . +.Sh SEE ALSO +.Xr acpi 4 , +.Xr sysctl 8 +.Sh AUTHORS +.An Nate Lawson .Sh BUGS The following drivers have not yet been converted to the .Nm @@ -263,9 +255,3 @@ implemented yet. .Pp When multiple CPUs offer frequency control, they cannot be set to different levels and must all offer the same frequency settings. -.Sh SEE ALSO -.Xr acpi 4 , -.Xr sysctl 8 -.Sh AUTHORS -.An -nosplit -.An Nate Lawson |