12 #ifdef CONFIG_GENERIC_CLOCKEVENTS
14 enum tick_device_mode {
15 TICKDEV_MODE_PERIODIC,
20 struct clock_event_device *evtdev;
21 enum tick_device_mode
mode;
52 unsigned long check_clocks;
53 enum tick_nohz_mode nohz_mode;
57 unsigned long idle_jiffies;
58 unsigned long idle_calls;
59 unsigned long idle_sleeps;
67 unsigned long last_jiffies;
68 unsigned long next_jiffies;
77 # ifdef CONFIG_HIGH_RES_TIMERS
78 extern int tick_init_highres(
void);
80 extern void tick_setup_sched_timer(
void);
83 # if defined CONFIG_NO_HZ || defined CONFIG_HIGH_RES_TIMERS
84 extern void tick_cancel_sched_timer(
int cpu);
86 static inline void tick_cancel_sched_timer(
int cpu) { }
89 # ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
93 # ifdef CONFIG_TICK_ONESHOT
94 extern struct cpumask *tick_get_broadcast_oneshot_mask(
void);
99 # ifdef CONFIG_TICK_ONESHOT
105 # ifndef arch_needs_cpu
106 # define arch_needs_cpu(cpu) (0)
117 static inline void tick_cancel_sched_timer(
int cpu) { }
125 extern void tick_nohz_idle_enter(
void);
126 extern void tick_nohz_idle_exit(
void);
127 extern void tick_nohz_irq_exit(
void);
128 extern ktime_t tick_nohz_get_sleep_length(
void);
129 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);
132 static inline void tick_nohz_idle_enter(
void) { }
133 static inline void tick_nohz_idle_exit(
void) { }
135 static inline ktime_t tick_nohz_get_sleep_length(
void)
141 static inline u64 get_cpu_idle_time_us(
int cpu,
u64 *
unused) {
return -1; }
142 static inline u64 get_cpu_iowait_time_us(
int cpu,
u64 *
unused) {
return -1; }