diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-04-22 23:01:44 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-04-22 23:01:44 -0400 |
commit | b5c4ababa76ce94cfa276f620b81d7d0f1d8ebf1 (patch) | |
tree | bc8c705a7b1b8e11c6789cecb5f6d9c3be09dad0 /include/linux | |
parent | fc757f4223edfab215d6e49cee479a09ecc17962 (diff) |
hrtimer: add support for starting timers on remote CPUs
This depends on the ability to send the special 'pull_timers' IPI
even with IRQs disabled.
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/hrtimer.h | 16 | ||||
-rw-r--r-- | include/linux/smp.h | 6 |
2 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 7a9398e197..4f45c83151 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -200,6 +200,19 @@ struct hrtimer_cpu_base { | |||
200 | struct list_head cb_pending; | 200 | struct list_head cb_pending; |
201 | unsigned long nr_events; | 201 | unsigned long nr_events; |
202 | #endif | 202 | #endif |
203 | struct list_head to_pull; | ||
204 | }; | ||
205 | |||
206 | #define HRTIMER_START_ON_INACTIVE 0 | ||
207 | #define HRTIMER_START_ON_QUEUED 1 | ||
208 | #define HRTIMER_START_ON_PROCESSED 2 | ||
209 | |||
210 | struct hrtimer_start_on_info { | ||
211 | struct list_head list; | ||
212 | struct hrtimer* timer; | ||
213 | ktime_t time; | ||
214 | enum hrtimer_mode mode; | ||
215 | atomic_t state; | ||
203 | }; | 216 | }; |
204 | 217 | ||
205 | #ifdef CONFIG_HIGH_RES_TIMERS | 218 | #ifdef CONFIG_HIGH_RES_TIMERS |
@@ -262,6 +275,9 @@ extern void hrtimer_init(struct hrtimer *timer, clockid_t which_clock, | |||
262 | /* Basic timer operations: */ | 275 | /* Basic timer operations: */ |
263 | extern int hrtimer_start(struct hrtimer *timer, ktime_t tim, | 276 | extern int hrtimer_start(struct hrtimer *timer, ktime_t tim, |
264 | const enum hrtimer_mode mode); | 277 | const enum hrtimer_mode mode); |
278 | extern int hrtimer_start_on(int cpu, struct hrtimer_start_on_info* info, | ||
279 | struct hrtimer *timer, ktime_t time, | ||
280 | const enum hrtimer_mode mode); | ||
265 | extern int hrtimer_cancel(struct hrtimer *timer); | 281 | extern int hrtimer_cancel(struct hrtimer *timer); |
266 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); | 282 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); |
267 | 283 | ||
diff --git a/include/linux/smp.h b/include/linux/smp.h index c25e66bcec..84df090ce4 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -35,6 +35,12 @@ extern void smp_send_reschedule(int cpu); | |||
35 | 35 | ||
36 | 36 | ||
37 | /* | 37 | /* |
38 | * sends a 'pull timers' event to another CPU: | ||
39 | */ | ||
40 | extern void smp_send_pull_timers(int cpu); | ||
41 | |||
42 | |||
43 | /* | ||
38 | * Prepare machine for booting other CPUs. | 44 | * Prepare machine for booting other CPUs. |
39 | */ | 45 | */ |
40 | extern void smp_prepare_cpus(unsigned int max_cpus); | 46 | extern void smp_prepare_cpus(unsigned int max_cpus); |