Lines Matching defs:stopper

36 /* the actual stopper, one per every possible cpu, enabled on online cpus */
41 bool enabled; /* is this stopper enabled? */
55 * If @task is a stopper task, it cannot migrate and task_cpu() is
58 struct cpu_stopper *stopper = per_cpu_ptr(&cpu_stopper, task_cpu(task));
60 if (task != stopper->thread)
63 printk("%sStopper: %pS <- %pS\n", log_lvl, stopper->fn, (void *)stopper->caller);
84 static void __cpu_stop_queue_work(struct cpu_stopper *stopper,
88 list_add_tail(&work->list, &stopper->works);
89 wake_q_add(wakeq, stopper->thread);
92 /* queue @work to @stopper. if offline, @work is completed immediately */
95 struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
101 raw_spin_lock_irqsave(&stopper->lock, flags);
102 enabled = stopper->enabled;
104 __cpu_stop_queue_work(stopper, work, &wakeq);
107 raw_spin_unlock_irqrestore(&stopper->lock, flags);
271 * The waking up of stopper threads has to happen in the same
275 * stopper forever.
375 * and will remain untouched until stopper starts executing @fn.
401 * preempted by a stopper which might wait for other stoppers
476 struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
480 raw_spin_lock_irqsave(&stopper->lock, flags);
481 run = !list_empty(&stopper->works);
482 raw_spin_unlock_irqrestore(&stopper->lock, flags);
488 struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
493 raw_spin_lock_irq(&stopper->lock);
494 if (!list_empty(&stopper->works)) {
495 work = list_first_entry(&stopper->works,
499 raw_spin_unlock_irq(&stopper->lock);
508 stopper->caller = work->caller;
509 stopper->fn = fn;
518 stopper->fn = NULL;
519 stopper->caller = 0;
528 struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
530 * Lockless. cpu_stopper_thread() will take stopper->lock and flush
534 stopper->enabled = false;
535 kthread_park(stopper->thread);
545 struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
547 WARN_ON(!list_empty(&stopper->works));
552 struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
554 stopper->enabled = true;
555 kthread_unpark(stopper->thread);
573 struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
575 raw_spin_lock_init(&stopper->lock);
576 INIT_LIST_HEAD(&stopper->works);