aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/rt_domain.c
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2010-05-30 19:46:21 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2010-06-01 10:23:13 -0400
commitcedc8df1cf1ff935af5455a9d565dac05192a47f (patch)
tree04771859bf08ff847894af6107e4b799a7a00cea /litmus/rt_domain.c
parent5b54b24c13b7c5dbaa06eae5e1a0075da354289c (diff)
Make release master support optional
Introduces CONFIG_RELEASE_MASTER and makes release master support dependent on the new symbol. This is useful because dedicated interrupt handling only applies to "large" multicore platforms. This will allow us to not implement smp_send_pull_timers() for all platforms.
Diffstat (limited to 'litmus/rt_domain.c')
-rw-r--r--litmus/rt_domain.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/litmus/rt_domain.c b/litmus/rt_domain.c
index 8d5db6050723..26f1cc48f865 100644
--- a/litmus/rt_domain.c
+++ b/litmus/rt_domain.c
@@ -158,7 +158,9 @@ static void reinit_release_heap(struct task_struct* t)
158 158
159 /* initialize */ 159 /* initialize */
160 bheap_init(&rh->heap); 160 bheap_init(&rh->heap);
161#ifdef __ARCH_HAS_SEND_PULL_TIMERS
161 atomic_set(&rh->info.state, HRTIMER_START_ON_INACTIVE); 162 atomic_set(&rh->info.state, HRTIMER_START_ON_INACTIVE);
163#endif
162} 164}
163/* arm_release_timer() - start local release timer or trigger 165/* arm_release_timer() - start local release timer or trigger
164 * remote timer (pull timer) 166 * remote timer (pull timer)
@@ -221,15 +223,19 @@ static void arm_release_timer(rt_domain_t *_rt)
221 * 223 *
222 * PINNED mode is ok on both local and remote CPU 224 * PINNED mode is ok on both local and remote CPU
223 */ 225 */
226#ifdef CONFIG_RELEASE_MASTER
224 if (rt->release_master == NO_CPU) 227 if (rt->release_master == NO_CPU)
228#endif
225 __hrtimer_start_range_ns(&rh->timer, 229 __hrtimer_start_range_ns(&rh->timer,
226 ns_to_ktime(rh->release_time), 230 ns_to_ktime(rh->release_time),
227 0, HRTIMER_MODE_ABS_PINNED, 0); 231 0, HRTIMER_MODE_ABS_PINNED, 0);
232#ifdef CONFIG_RELEASE_MASTER
228 else 233 else
229 hrtimer_start_on(rt->release_master, 234 hrtimer_start_on(rt->release_master,
230 &rh->info, &rh->timer, 235 &rh->info, &rh->timer,
231 ns_to_ktime(rh->release_time), 236 ns_to_ktime(rh->release_time),
232 HRTIMER_MODE_ABS_PINNED); 237 HRTIMER_MODE_ABS_PINNED);
238#endif
233 } else 239 } else
234 TRACE_TASK(t, "0x%p is not my timer\n", &rh->timer); 240 TRACE_TASK(t, "0x%p is not my timer\n", &rh->timer);
235 } 241 }
@@ -251,7 +257,9 @@ void rt_domain_init(rt_domain_t *rt,
251 if (!order) 257 if (!order)
252 order = dummy_order; 258 order = dummy_order;
253 259
260#ifdef CONFIG_RELEASE_MASTER
254 rt->release_master = NO_CPU; 261 rt->release_master = NO_CPU;
262#endif
255 263
256 bheap_init(&rt->ready_queue); 264 bheap_init(&rt->ready_queue);
257 INIT_LIST_HEAD(&rt->tobe_released); 265 INIT_LIST_HEAD(&rt->tobe_released);