diff options
Diffstat (limited to 'include/linux/tick.h')
-rw-r--r-- | include/linux/tick.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/tick.h b/include/linux/tick.h index 1a6567b48492..553272e6af55 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h | |||
@@ -8,6 +8,8 @@ | |||
8 | 8 | ||
9 | #include <linux/clockchips.h> | 9 | #include <linux/clockchips.h> |
10 | #include <linux/irqflags.h> | 10 | #include <linux/irqflags.h> |
11 | #include <linux/percpu.h> | ||
12 | #include <linux/hrtimer.h> | ||
11 | 13 | ||
12 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | 14 | #ifdef CONFIG_GENERIC_CLOCKEVENTS |
13 | 15 | ||
@@ -122,13 +124,26 @@ static inline int tick_oneshot_mode_active(void) { return 0; } | |||
122 | #endif /* !CONFIG_GENERIC_CLOCKEVENTS */ | 124 | #endif /* !CONFIG_GENERIC_CLOCKEVENTS */ |
123 | 125 | ||
124 | # ifdef CONFIG_NO_HZ | 126 | # ifdef CONFIG_NO_HZ |
127 | DECLARE_PER_CPU(struct tick_sched, tick_cpu_sched); | ||
128 | |||
129 | static inline int tick_nohz_tick_stopped(void) | ||
130 | { | ||
131 | return __this_cpu_read(tick_cpu_sched.tick_stopped); | ||
132 | } | ||
133 | |||
125 | extern void tick_nohz_idle_enter(void); | 134 | extern void tick_nohz_idle_enter(void); |
126 | extern void tick_nohz_idle_exit(void); | 135 | extern void tick_nohz_idle_exit(void); |
127 | extern void tick_nohz_irq_exit(void); | 136 | extern void tick_nohz_irq_exit(void); |
128 | extern ktime_t tick_nohz_get_sleep_length(void); | 137 | extern ktime_t tick_nohz_get_sleep_length(void); |
129 | extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time); | 138 | extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time); |
130 | extern u64 get_cpu_iowait_time_us(int cpu, u64 *last_update_time); | 139 | extern u64 get_cpu_iowait_time_us(int cpu, u64 *last_update_time); |
131 | # else | 140 | |
141 | # else /* !CONFIG_NO_HZ */ | ||
142 | static inline int tick_nohz_tick_stopped(void) | ||
143 | { | ||
144 | return 0; | ||
145 | } | ||
146 | |||
132 | static inline void tick_nohz_idle_enter(void) { } | 147 | static inline void tick_nohz_idle_enter(void) { } |
133 | static inline void tick_nohz_idle_exit(void) { } | 148 | static inline void tick_nohz_idle_exit(void) { } |
134 | 149 | ||