2 * tick internal variable and functions used by low/high res code
4 DECLARE_PER_CPU(struct tick_device, tick_cpu_device);
5 extern spinlock_t tick_device_lock;
6 extern ktime_t tick_next_period;
7 extern ktime_t tick_period;
9 extern void tick_setup_periodic(struct clock_event_device *dev, int broadcast);
10 extern void tick_handle_periodic(struct clock_event_device *dev);
13 * Broadcasting support
15 #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
16 extern int tick_do_broadcast(cpumask_t mask);
17 extern struct tick_device tick_broadcast_device;
18 extern spinlock_t tick_broadcast_lock;
20 extern int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu);
21 extern int tick_check_broadcast_device(struct clock_event_device *dev);
22 extern int tick_is_broadcast_device(struct clock_event_device *dev);
23 extern void tick_broadcast_on_off(unsigned long reason, int *oncpu);
24 extern void tick_shutdown_broadcast(unsigned int *cpup);
27 tick_set_periodic_handler(struct clock_event_device *dev, int broadcast);
29 #else /* !BROADCAST */
31 static inline int tick_check_broadcast_device(struct clock_event_device *dev)
36 static inline int tick_is_broadcast_device(struct clock_event_device *dev)
40 static inline int tick_device_uses_broadcast(struct clock_event_device *dev,
45 static inline void tick_do_periodic_broadcast(struct clock_event_device *d) { }
46 static inline void tick_broadcast_on_off(unsigned long reason, int *oncpu) { }
47 static inline void tick_shutdown_broadcast(unsigned int *cpup) { }
50 * Set the periodic handler in non broadcast mode
52 static inline void tick_set_periodic_handler(struct clock_event_device *dev,
55 dev->event_handler = tick_handle_periodic;
57 #endif /* !BROADCAST */
60 * Check, if the device is functional or a dummy for broadcast
62 static inline int tick_device_is_functional(struct clock_event_device *dev)
64 return !(dev->features & CLOCK_EVT_FEAT_DUMMY);