diff options
Diffstat (limited to 'include/linux/tick.h')
-rw-r--r-- | include/linux/tick.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/tick.h b/include/linux/tick.h index d3c02695dc5d..b6ec8189ac0c 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h | |||
@@ -74,10 +74,13 @@ extern struct tick_device *tick_get_device(int cpu); | |||
74 | extern int tick_init_highres(void); | 74 | extern int tick_init_highres(void); |
75 | extern int tick_program_event(ktime_t expires, int force); | 75 | extern int tick_program_event(ktime_t expires, int force); |
76 | extern void tick_setup_sched_timer(void); | 76 | extern void tick_setup_sched_timer(void); |
77 | # endif | ||
78 | |||
79 | # if defined CONFIG_NO_HZ || defined CONFIG_HIGH_RES_TIMERS | ||
77 | extern void tick_cancel_sched_timer(int cpu); | 80 | extern void tick_cancel_sched_timer(int cpu); |
78 | # else | 81 | # else |
79 | static inline void tick_cancel_sched_timer(int cpu) { } | 82 | static inline void tick_cancel_sched_timer(int cpu) { } |
80 | # endif /* HIGHRES */ | 83 | # endif |
81 | 84 | ||
82 | # ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST | 85 | # ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST |
83 | extern struct tick_device *tick_get_broadcast_device(void); | 86 | extern struct tick_device *tick_get_broadcast_device(void); |
@@ -93,9 +96,11 @@ extern cpumask_t *tick_get_broadcast_oneshot_mask(void); | |||
93 | extern void tick_clock_notify(void); | 96 | extern void tick_clock_notify(void); |
94 | extern int tick_check_oneshot_change(int allow_nohz); | 97 | extern int tick_check_oneshot_change(int allow_nohz); |
95 | extern struct tick_sched *tick_get_tick_sched(int cpu); | 98 | extern struct tick_sched *tick_get_tick_sched(int cpu); |
99 | extern void tick_check_idle(int cpu); | ||
96 | # else | 100 | # else |
97 | static inline void tick_clock_notify(void) { } | 101 | static inline void tick_clock_notify(void) { } |
98 | static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } | 102 | static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } |
103 | static inline void tick_check_idle(int cpu) { } | ||
99 | # endif | 104 | # endif |
100 | 105 | ||
101 | #else /* CONFIG_GENERIC_CLOCKEVENTS */ | 106 | #else /* CONFIG_GENERIC_CLOCKEVENTS */ |
@@ -103,27 +108,24 @@ static inline void tick_init(void) { } | |||
103 | static inline void tick_cancel_sched_timer(int cpu) { } | 108 | static inline void tick_cancel_sched_timer(int cpu) { } |
104 | static inline void tick_clock_notify(void) { } | 109 | static inline void tick_clock_notify(void) { } |
105 | static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } | 110 | static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } |
111 | static inline void tick_check_idle(int cpu) { } | ||
106 | #endif /* !CONFIG_GENERIC_CLOCKEVENTS */ | 112 | #endif /* !CONFIG_GENERIC_CLOCKEVENTS */ |
107 | 113 | ||
108 | # ifdef CONFIG_NO_HZ | 114 | # ifdef CONFIG_NO_HZ |
109 | extern void tick_nohz_stop_sched_tick(int inidle); | 115 | extern void tick_nohz_stop_sched_tick(int inidle); |
110 | extern void tick_nohz_restart_sched_tick(void); | 116 | extern void tick_nohz_restart_sched_tick(void); |
111 | extern void tick_nohz_update_jiffies(void); | ||
112 | extern ktime_t tick_nohz_get_sleep_length(void); | 117 | extern ktime_t tick_nohz_get_sleep_length(void); |
113 | extern void tick_nohz_stop_idle(int cpu); | ||
114 | extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time); | 118 | extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time); |
115 | # else | 119 | # else |
116 | static inline void tick_nohz_stop_sched_tick(int inidle) { } | 120 | static inline void tick_nohz_stop_sched_tick(int inidle) { } |
117 | static inline void tick_nohz_restart_sched_tick(void) { } | 121 | static inline void tick_nohz_restart_sched_tick(void) { } |
118 | static inline void tick_nohz_update_jiffies(void) { } | ||
119 | static inline ktime_t tick_nohz_get_sleep_length(void) | 122 | static inline ktime_t tick_nohz_get_sleep_length(void) |
120 | { | 123 | { |
121 | ktime_t len = { .tv64 = NSEC_PER_SEC/HZ }; | 124 | ktime_t len = { .tv64 = NSEC_PER_SEC/HZ }; |
122 | 125 | ||
123 | return len; | 126 | return len; |
124 | } | 127 | } |
125 | static inline void tick_nohz_stop_idle(int cpu) { } | 128 | static inline u64 get_cpu_idle_time_us(int cpu, u64 *unused) { return -1; } |
126 | static inline u64 get_cpu_idle_time_us(int cpu, u64 *unused) { return 0; } | ||
127 | # endif /* !NO_HZ */ | 129 | # endif /* !NO_HZ */ |
128 | 130 | ||
129 | #endif | 131 | #endif |