Lines Matching refs:stopper
58 struct cpu_stopper *stopper = per_cpu_ptr(&cpu_stopper, task_cpu(task)); in print_stop_info() local
60 if (task != stopper->thread) in print_stop_info()
63 printk("%sStopper: %pS <- %pS\n", log_lvl, stopper->fn, (void *)stopper->caller); in print_stop_info()
84 static void __cpu_stop_queue_work(struct cpu_stopper *stopper, in __cpu_stop_queue_work() argument
88 list_add_tail(&work->list, &stopper->works); in __cpu_stop_queue_work()
89 wake_q_add(wakeq, stopper->thread); in __cpu_stop_queue_work()
95 struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu); in cpu_stop_queue_work() local
101 raw_spin_lock_irqsave(&stopper->lock, flags); in cpu_stop_queue_work()
102 enabled = stopper->enabled; in cpu_stop_queue_work()
104 __cpu_stop_queue_work(stopper, work, &wakeq); in cpu_stop_queue_work()
107 raw_spin_unlock_irqrestore(&stopper->lock, flags); in cpu_stop_queue_work()
478 struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu); in cpu_stop_should_run() local
482 raw_spin_lock_irqsave(&stopper->lock, flags); in cpu_stop_should_run()
483 run = !list_empty(&stopper->works); in cpu_stop_should_run()
484 raw_spin_unlock_irqrestore(&stopper->lock, flags); in cpu_stop_should_run()
490 struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu); in cpu_stopper_thread() local
495 raw_spin_lock_irq(&stopper->lock); in cpu_stopper_thread()
496 if (!list_empty(&stopper->works)) { in cpu_stopper_thread()
497 work = list_first_entry(&stopper->works, in cpu_stopper_thread()
501 raw_spin_unlock_irq(&stopper->lock); in cpu_stopper_thread()
510 stopper->caller = work->caller; in cpu_stopper_thread()
511 stopper->fn = fn; in cpu_stopper_thread()
520 stopper->fn = NULL; in cpu_stopper_thread()
521 stopper->caller = 0; in cpu_stopper_thread()
530 struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu); in stop_machine_park() local
536 stopper->enabled = false; in stop_machine_park()
537 kthread_park(stopper->thread); in stop_machine_park()
547 struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu); in cpu_stop_park() local
549 WARN_ON(!list_empty(&stopper->works)); in cpu_stop_park()
554 struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu); in stop_machine_unpark() local
556 stopper->enabled = true; in stop_machine_unpark()
557 kthread_unpark(stopper->thread); in stop_machine_unpark()
575 struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu); in cpu_stop_init() local
577 raw_spin_lock_init(&stopper->lock); in cpu_stop_init()
578 INIT_LIST_HEAD(&stopper->works); in cpu_stop_init()