aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/hrtimer.h32
-rw-r--r--include/linux/smp.h5
2 files changed, 37 insertions, 0 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 05f6df1fdf5b..d1be5d2cb8fc 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -178,6 +178,7 @@ enum hrtimer_base_type {
178 * @nr_hangs: Total number of hrtimer interrupt hangs 178 * @nr_hangs: Total number of hrtimer interrupt hangs
179 * @max_hang_time: Maximum time spent in hrtimer_interrupt 179 * @max_hang_time: Maximum time spent in hrtimer_interrupt
180 * @clock_base: array of clock bases for this cpu 180 * @clock_base: array of clock bases for this cpu
181 * @to_pull: LITMUS^RT list of timers to be pulled on this cpu
181 */ 182 */
182struct hrtimer_cpu_base { 183struct hrtimer_cpu_base {
183 raw_spinlock_t lock; 184 raw_spinlock_t lock;
@@ -195,8 +196,32 @@ struct hrtimer_cpu_base {
195 ktime_t max_hang_time; 196 ktime_t max_hang_time;
196#endif 197#endif
197 struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; 198 struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
199 struct list_head to_pull;
198}; 200};
199 201
202#ifdef CONFIG_ARCH_HAS_SEND_PULL_TIMERS
203
204#define HRTIMER_START_ON_INACTIVE 0
205#define HRTIMER_START_ON_QUEUED 1
206
207/*
208 * struct hrtimer_start_on_info - save timer info on remote cpu
209 * @list: list of hrtimer_start_on_info on remote cpu (to_pull)
210 * @timer: timer to be triggered on remote cpu
211 * @time: time event
212 * @mode: timer mode
213 * @state: activity flag
214 */
215struct hrtimer_start_on_info {
216 struct list_head list;
217 struct hrtimer *timer;
218 ktime_t time;
219 enum hrtimer_mode mode;
220 atomic_t state;
221};
222
223#endif
224
200static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) 225static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time)
201{ 226{
202 timer->node.expires = time; 227 timer->node.expires = time;
@@ -362,6 +387,13 @@ __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
362 unsigned long delta_ns, 387 unsigned long delta_ns,
363 const enum hrtimer_mode mode, int wakeup); 388 const enum hrtimer_mode mode, int wakeup);
364 389
390#ifdef CONFIG_ARCH_HAS_SEND_PULL_TIMERS
391extern void hrtimer_start_on_info_init(struct hrtimer_start_on_info *info);
392extern int hrtimer_start_on(int cpu, struct hrtimer_start_on_info *info,
393 struct hrtimer *timer, ktime_t time,
394 const enum hrtimer_mode mode);
395#endif
396
365extern int hrtimer_cancel(struct hrtimer *timer); 397extern int hrtimer_cancel(struct hrtimer *timer);
366extern int hrtimer_try_to_cancel(struct hrtimer *timer); 398extern int hrtimer_try_to_cancel(struct hrtimer *timer);
367 399
diff --git a/include/linux/smp.h b/include/linux/smp.h
index c4414074bd88..dfc63fe33a63 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -103,6 +103,11 @@ void kick_all_cpus_sync(void);
103void wake_up_all_idle_cpus(void); 103void wake_up_all_idle_cpus(void);
104 104
105/* 105/*
106 * sends a 'pull timer' event to a remote CPU
107 */
108extern void smp_send_pull_timers(int cpu);
109
110/*
106 * Generic and arch helpers 111 * Generic and arch helpers
107 */ 112 */
108void __init call_function_init(void); 113void __init call_function_init(void);