Skip to content

Commit 379480d

Browse files
committed
cpufreq: Move governor symbols to cpufreq.h
Move definitions of symbols related to transition latency and sampling rate to include/linux/cpufreq.h so they can be used by (future) goverernors located outside of drivers/cpufreq/. No functional changes. Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Viresh Kumar <[email protected]>
1 parent 66893b6 commit 379480d

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

drivers/cpufreq/cpufreq_governor.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,6 @@
2424
#include <linux/module.h>
2525
#include <linux/mutex.h>
2626

27-
/*
28-
* The polling frequency depends on the capability of the processor. Default
29-
* polling frequency is 1000 times the transition latency of the processor. The
30-
* governor will work on any processor with transition latency <= 10ms, using
31-
* appropriate sampling rate.
32-
*
33-
* For CPUs with transition latency > 10ms (mostly drivers with CPUFREQ_ETERNAL)
34-
* this governor will not work. All times here are in us (micro seconds).
35-
*/
36-
#define MIN_SAMPLING_RATE_RATIO (2)
37-
#define LATENCY_MULTIPLIER (1000)
38-
#define MIN_LATENCY_MULTIPLIER (20)
39-
#define TRANSITION_LATENCY_LIMIT (10 * 1000 * 1000)
40-
4127
/* Ondemand Sampling types */
4228
enum {OD_NORMAL_SAMPLE, OD_SUB_SAMPLE};
4329

include/linux/cpufreq.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,20 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div,
426426
#define CPUFREQ_POLICY_POWERSAVE (1)
427427
#define CPUFREQ_POLICY_PERFORMANCE (2)
428428

429+
/*
430+
* The polling frequency depends on the capability of the processor. Default
431+
* polling frequency is 1000 times the transition latency of the processor. The
432+
* ondemand governor will work on any processor with transition latency <= 10ms,
433+
* using appropriate sampling rate.
434+
*
435+
* For CPUs with transition latency > 10ms (mostly drivers with CPUFREQ_ETERNAL)
436+
* the ondemand governor will not work. All times here are in us (microseconds).
437+
*/
438+
#define MIN_SAMPLING_RATE_RATIO (2)
439+
#define LATENCY_MULTIPLIER (1000)
440+
#define MIN_LATENCY_MULTIPLIER (20)
441+
#define TRANSITION_LATENCY_LIMIT (10 * 1000 * 1000)
442+
429443
/* Governor Events */
430444
#define CPUFREQ_GOV_START 1
431445
#define CPUFREQ_GOV_STOP 2

0 commit comments

Comments
 (0)