Lines Matching refs:cpu_hotplug
76 } cpu_hotplug = { variable
78 .wq = __WAIT_QUEUE_HEAD_INITIALIZER(cpu_hotplug.wq),
79 .lock = __MUTEX_INITIALIZER(cpu_hotplug.lock),
86 #define cpuhp_lock_acquire_read() lock_map_acquire_read(&cpu_hotplug.dep_map)
88 lock_map_acquire_tryread(&cpu_hotplug.dep_map)
89 #define cpuhp_lock_acquire() lock_map_acquire(&cpu_hotplug.dep_map)
90 #define cpuhp_lock_release() lock_map_release(&cpu_hotplug.dep_map)
96 if (cpu_hotplug.active_writer == current) in get_online_cpus()
99 mutex_lock(&cpu_hotplug.lock); in get_online_cpus()
100 atomic_inc(&cpu_hotplug.refcount); in get_online_cpus()
101 mutex_unlock(&cpu_hotplug.lock); in get_online_cpus()
109 if (cpu_hotplug.active_writer == current) in put_online_cpus()
112 refcount = atomic_dec_return(&cpu_hotplug.refcount); in put_online_cpus()
114 atomic_inc(&cpu_hotplug.refcount); in put_online_cpus()
116 if (refcount <= 0 && waitqueue_active(&cpu_hotplug.wq)) in put_online_cpus()
117 wake_up(&cpu_hotplug.wq); in put_online_cpus()
150 cpu_hotplug.active_writer = current; in cpu_hotplug_begin()
154 mutex_lock(&cpu_hotplug.lock); in cpu_hotplug_begin()
155 prepare_to_wait(&cpu_hotplug.wq, &wait, TASK_UNINTERRUPTIBLE); in cpu_hotplug_begin()
156 if (likely(!atomic_read(&cpu_hotplug.refcount))) in cpu_hotplug_begin()
158 mutex_unlock(&cpu_hotplug.lock); in cpu_hotplug_begin()
161 finish_wait(&cpu_hotplug.wq, &wait); in cpu_hotplug_begin()
166 cpu_hotplug.active_writer = NULL; in cpu_hotplug_done()
167 mutex_unlock(&cpu_hotplug.lock); in cpu_hotplug_done()