Lines Matching refs:mem_hotplug
65 } mem_hotplug = { variable
67 .lock = __MUTEX_INITIALIZER(mem_hotplug.lock),
75 #define memhp_lock_acquire_read() lock_map_acquire_read(&mem_hotplug.dep_map)
76 #define memhp_lock_acquire() lock_map_acquire(&mem_hotplug.dep_map)
77 #define memhp_lock_release() lock_map_release(&mem_hotplug.dep_map)
82 if (mem_hotplug.active_writer == current) in get_online_mems()
85 mutex_lock(&mem_hotplug.lock); in get_online_mems()
86 mem_hotplug.refcount++; in get_online_mems()
87 mutex_unlock(&mem_hotplug.lock); in get_online_mems()
93 if (mem_hotplug.active_writer == current) in put_online_mems()
95 mutex_lock(&mem_hotplug.lock); in put_online_mems()
97 if (WARN_ON(!mem_hotplug.refcount)) in put_online_mems()
98 mem_hotplug.refcount++; /* try to fix things up */ in put_online_mems()
100 if (!--mem_hotplug.refcount && unlikely(mem_hotplug.active_writer)) in put_online_mems()
101 wake_up_process(mem_hotplug.active_writer); in put_online_mems()
102 mutex_unlock(&mem_hotplug.lock); in put_online_mems()
109 mem_hotplug.active_writer = current; in mem_hotplug_begin()
113 mutex_lock(&mem_hotplug.lock); in mem_hotplug_begin()
114 if (likely(!mem_hotplug.refcount)) in mem_hotplug_begin()
117 mutex_unlock(&mem_hotplug.lock); in mem_hotplug_begin()
124 mem_hotplug.active_writer = NULL; in mem_hotplug_done()
125 mutex_unlock(&mem_hotplug.lock); in mem_hotplug_done()