Lines Matching refs:cpu_hotplug

75 } cpu_hotplug = {  variable
77 .wq = __WAIT_QUEUE_HEAD_INITIALIZER(cpu_hotplug.wq),
78 .lock = __MUTEX_INITIALIZER(cpu_hotplug.lock),
85 #define cpuhp_lock_acquire_read() lock_map_acquire_read(&cpu_hotplug.dep_map)
87 lock_map_acquire_tryread(&cpu_hotplug.dep_map)
88 #define cpuhp_lock_acquire() lock_map_acquire(&cpu_hotplug.dep_map)
89 #define cpuhp_lock_release() lock_map_release(&cpu_hotplug.dep_map)
95 if (cpu_hotplug.active_writer == current) in get_online_cpus()
98 mutex_lock(&cpu_hotplug.lock); in get_online_cpus()
99 atomic_inc(&cpu_hotplug.refcount); in get_online_cpus()
100 mutex_unlock(&cpu_hotplug.lock); in get_online_cpus()
106 if (cpu_hotplug.active_writer == current) in try_get_online_cpus()
108 if (!mutex_trylock(&cpu_hotplug.lock)) in try_get_online_cpus()
111 atomic_inc(&cpu_hotplug.refcount); in try_get_online_cpus()
112 mutex_unlock(&cpu_hotplug.lock); in try_get_online_cpus()
121 if (cpu_hotplug.active_writer == current) in put_online_cpus()
124 refcount = atomic_dec_return(&cpu_hotplug.refcount); in put_online_cpus()
126 atomic_inc(&cpu_hotplug.refcount); in put_online_cpus()
128 if (refcount <= 0 && waitqueue_active(&cpu_hotplug.wq)) in put_online_cpus()
129 wake_up(&cpu_hotplug.wq); in put_online_cpus()
162 cpu_hotplug.active_writer = current; in cpu_hotplug_begin()
166 mutex_lock(&cpu_hotplug.lock); in cpu_hotplug_begin()
167 prepare_to_wait(&cpu_hotplug.wq, &wait, TASK_UNINTERRUPTIBLE); in cpu_hotplug_begin()
168 if (likely(!atomic_read(&cpu_hotplug.refcount))) in cpu_hotplug_begin()
170 mutex_unlock(&cpu_hotplug.lock); in cpu_hotplug_begin()
173 finish_wait(&cpu_hotplug.wq, &wait); in cpu_hotplug_begin()
178 cpu_hotplug.active_writer = NULL; in cpu_hotplug_done()
179 mutex_unlock(&cpu_hotplug.lock); in cpu_hotplug_done()