summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2005-02-13 05:37:19 +0000
committernjl <njl@FreeBSD.org>2005-02-13 05:37:19 +0000
commit5c3b12e2ce6144d280fb90697fe0141eff2ae2da (patch)
treea7a894a253f9f4c3c46c71e2ef75dbb51d659618 /sys
parent924e5aa5c357055fb16e98a3a906c22cc6deb278 (diff)
downloadFreeBSD-src-5c3b12e2ce6144d280fb90697fe0141eff2ae2da.zip
FreeBSD-src-5c3b12e2ce6144d280fb90697fe0141eff2ae2da.tar.gz
Add the new CPUFREQ_FLAG_INFO_ONLY flag for drivers which can attach to
read info about the possible settings for a CPU but cannot control them directly.
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/cpu.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/sys/cpu.h b/sys/sys/cpu.h
index f737768..99304b2 100644
--- a/sys/sys/cpu.h
+++ b/sys/sys/cpu.h
@@ -48,7 +48,7 @@ static __inline struct pcpu *cpu_get_pcpu(device_t dev)
/* Each driver's CPU frequency setting is exported in this format. */
struct cf_setting {
- int freq; /* Processor clock in Mhz or percent (in 100ths.) */
+ int freq; /* CPU clock in Mhz or 100ths of a percent. */
int volts; /* Voltage in mV. */
int power; /* Power consumed in mW. */
int lat; /* Transition latency in us. */
@@ -82,9 +82,18 @@ TAILQ_HEAD(cf_level_lst, cf_level);
* frequency settings of 100, 200 and 300, 400 and a relative driver that
* provides settings of 50%, 100%. The cpufreq core would export frequency
* levels of 50, 100, 150, 200, 300, 400.
+ *
+ * The "info only" flag signifies that settings returned by
+ * CPUFREQ_DRV_SETTINGS cannot be passed to the CPUFREQ_DRV_SET method and
+ * are only informational. This is for some drivers that can return
+ * information about settings but rely on another machine-dependent driver
+ * for actually performing the frequency transition (e.g., ACPI performance
+ * states of type "functional fixed hardware.")
*/
+#define CPUFREQ_TYPE_MASK 0xffff
#define CPUFREQ_TYPE_RELATIVE (1<<0)
#define CPUFREQ_TYPE_ABSOLUTE (1<<1)
+#define CPUFREQ_FLAG_INFO_ONLY (1<<16)
/*
* When setting a level, the caller indicates the priority of this request.
OpenPOWER on IntegriCloud