diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/cpufreq.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index f10a9b3761cd..5f40522ec98c 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
| @@ -370,6 +370,12 @@ struct cpufreq_driver { | |||
| 370 | */ | 370 | */ |
| 371 | #define CPUFREQ_NEED_INITIAL_FREQ_CHECK (1 << 5) | 371 | #define CPUFREQ_NEED_INITIAL_FREQ_CHECK (1 << 5) |
| 372 | 372 | ||
| 373 | /* | ||
| 374 | * Set by drivers to disallow use of governors with "dynamic_switching" flag | ||
| 375 | * set. | ||
| 376 | */ | ||
| 377 | #define CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING (1 << 6) | ||
| 378 | |||
| 373 | int cpufreq_register_driver(struct cpufreq_driver *driver_data); | 379 | int cpufreq_register_driver(struct cpufreq_driver *driver_data); |
| 374 | int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); | 380 | int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); |
| 375 | 381 | ||
| @@ -487,14 +493,8 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div, | |||
| 487 | * polling frequency is 1000 times the transition latency of the processor. The | 493 | * polling frequency is 1000 times the transition latency of the processor. The |
| 488 | * ondemand governor will work on any processor with transition latency <= 10ms, | 494 | * ondemand governor will work on any processor with transition latency <= 10ms, |
| 489 | * using appropriate sampling rate. | 495 | * using appropriate sampling rate. |
| 490 | * | ||
| 491 | * For CPUs with transition latency > 10ms (mostly drivers with CPUFREQ_ETERNAL) | ||
| 492 | * the ondemand governor will not work. All times here are in us (microseconds). | ||
| 493 | */ | 496 | */ |
| 494 | #define MIN_SAMPLING_RATE_RATIO (2) | ||
| 495 | #define LATENCY_MULTIPLIER (1000) | 497 | #define LATENCY_MULTIPLIER (1000) |
| 496 | #define MIN_LATENCY_MULTIPLIER (20) | ||
| 497 | #define TRANSITION_LATENCY_LIMIT (10 * 1000 * 1000) | ||
| 498 | 498 | ||
| 499 | struct cpufreq_governor { | 499 | struct cpufreq_governor { |
| 500 | char name[CPUFREQ_NAME_LEN]; | 500 | char name[CPUFREQ_NAME_LEN]; |
| @@ -507,9 +507,8 @@ struct cpufreq_governor { | |||
| 507 | char *buf); | 507 | char *buf); |
| 508 | int (*store_setspeed) (struct cpufreq_policy *policy, | 508 | int (*store_setspeed) (struct cpufreq_policy *policy, |
| 509 | unsigned int freq); | 509 | unsigned int freq); |
| 510 | unsigned int max_transition_latency; /* HW must be able to switch to | 510 | /* For governors which change frequency dynamically by themselves */ |
| 511 | next freq faster than this value in nano secs or we | 511 | bool dynamic_switching; |
| 512 | will fallback to performance governor */ | ||
| 513 | struct list_head governor_list; | 512 | struct list_head governor_list; |
| 514 | struct module *owner; | 513 | struct module *owner; |
| 515 | }; | 514 | }; |
| @@ -525,6 +524,7 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy, | |||
| 525 | unsigned int relation); | 524 | unsigned int relation); |
| 526 | unsigned int cpufreq_driver_resolve_freq(struct cpufreq_policy *policy, | 525 | unsigned int cpufreq_driver_resolve_freq(struct cpufreq_policy *policy, |
| 527 | unsigned int target_freq); | 526 | unsigned int target_freq); |
| 527 | unsigned int cpufreq_policy_transition_delay_us(struct cpufreq_policy *policy); | ||
| 528 | int cpufreq_register_governor(struct cpufreq_governor *governor); | 528 | int cpufreq_register_governor(struct cpufreq_governor *governor); |
| 529 | void cpufreq_unregister_governor(struct cpufreq_governor *governor); | 529 | void cpufreq_unregister_governor(struct cpufreq_governor *governor); |
| 530 | 530 | ||
