• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/kernel/

Lines Matching refs:stopper

35 /* the actual stopper, one per every possible cpu, enabled on online cpus */
38 bool enabled; /* is this stopper enabled? */
40 struct task_struct *thread; /* stopper thread */
63 /* queue @work to @stopper. if offline, @work is completed immediately */
64 static void cpu_stop_queue_work(struct cpu_stopper *stopper,
69 spin_lock_irqsave(&stopper->lock, flags);
71 if (stopper->enabled) {
72 list_add_tail(&work->list, &stopper->works);
73 wake_up_process(stopper->thread);
77 spin_unlock_irqrestore(&stopper->lock, flags);
123 * and will remain untouched until stopper starts executing @fn.
156 * preempted by a stopper which might wait for other stoppers
240 struct cpu_stopper *stopper = data;
253 spin_lock_irq(&stopper->lock);
254 if (!list_empty(&stopper->works)) {
255 work = list_first_entry(&stopper->works,
259 spin_unlock_irq(&stopper->lock);
290 /* manage stopper for a cpu, mostly lifted from sched migration thread mgmt */
296 struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
301 BUG_ON(stopper->thread || stopper->enabled ||
302 !list_empty(&stopper->works));
303 p = kthread_create(cpu_stopper_thread, stopper, "migration/%d",
309 stopper->thread = p;
313 kthread_bind(stopper->thread, cpu);
315 wake_up_process(stopper->thread);
317 spin_lock_irq(&stopper->lock);
318 stopper->enabled = true;
319 spin_unlock_irq(&stopper->lock);
328 /* kill the stopper */
329 kthread_stop(stopper->thread);
331 spin_lock_irq(&stopper->lock);
332 list_for_each_entry(work, &stopper->works, list)
334 stopper->enabled = false;
335 spin_unlock_irq(&stopper->lock);
336 /* release the stopper */
337 put_task_struct(stopper->thread);
338 stopper->thread = NULL;
348 * Give it a higher priority so that cpu stopper is available to other
364 struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
366 spin_lock_init(&stopper->lock);
367 INIT_LIST_HEAD(&stopper->works);