Lines Matching defs:bringup

56  * @bringup:	Single callback bringup or teardown selector
75 bool bringup;
101 static inline void cpuhp_lock_acquire(bool bringup)
103 lock_map_acquire(bringup ? &cpuhp_state_up_map : &cpuhp_state_down_map);
106 static inline void cpuhp_lock_release(bool bringup)
108 lock_map_release(bringup ? &cpuhp_state_up_map : &cpuhp_state_down_map);
112 static inline void cpuhp_lock_acquire(bool bringup) { }
113 static inline void cpuhp_lock_release(bool bringup) { }
152 static bool cpuhp_step_empty(bool bringup, struct cpuhp_step *step)
154 return bringup ? !step->startup.single : !step->teardown.single;
161 * @bringup: True if the bringup callback should be invoked
170 bool bringup, struct hlist_node *node,
184 if (cpuhp_step_empty(bringup, step)) {
191 cb = bringup ? step->startup.single : step->teardown.single;
198 cbm = bringup ? step->startup.multi : step->teardown.multi;
232 cbm = !bringup ? step->startup.multi : step->teardown.multi;
261 static inline void wait_for_ap_thread(struct cpuhp_cpu_state *st, bool bringup)
263 struct completion *done = bringup ? &st->done_up : &st->done_down;
267 static inline void complete_ap_thread(struct cpuhp_cpu_state *st, bool bringup)
269 struct completion *done = bringup ? &st->done_up : &st->done_down;
293 * cpuhp_ap_update_sync_state - Update synchronization state during bringup/teardown
433 * Early CPU bringup synchronization point. Cannot use cpuhp_state::done_up
434 * because the AP cannot issue complete() so early in the bringup.
702 bool bringup = st->state < target;
709 st->bringup = bringup;
710 if (cpu_dying(cpu) != !bringup)
711 set_cpu_dying(cpu, !bringup);
720 bool bringup = !st->bringup;
725 * Already rolling back. No need invert the bringup value or to change
738 if (st->bringup)
744 st->bringup = bringup;
745 if (cpu_dying(cpu) != !bringup)
746 set_cpu_dying(cpu, !bringup);
763 wait_for_ap_thread(st, st->bringup);
823 * Prevent irq alloc/free across the bringup.
860 * Prevent irq alloc/free across the bringup by acquiring the
918 static bool cpuhp_next_state(bool bringup,
924 if (bringup) {
936 if (!cpuhp_step_empty(bringup, cpuhp_get_step(*state_to_run)))
943 static int __cpuhp_invoke_callback_range(bool bringup,
952 while (cpuhp_next_state(bringup, &state, st, target)) {
955 err = cpuhp_invoke_callback(cpu, state, bringup, NULL, NULL);
961 cpu, bringup ? "UP" : "DOWN",
974 static inline int cpuhp_invoke_callback_range(bool bringup,
979 return __cpuhp_invoke_callback_range(bringup, cpu, st, target, false);
982 static inline void cpuhp_invoke_callback_range_nofail(bool bringup,
987 __cpuhp_invoke_callback_range(bringup, cpu, st, target, true);
1025 * The cpu hotplug threads manage the bringup and teardown of the cpus
1051 bool bringup = st->bringup;
1069 cpuhp_lock_acquire(bringup);
1075 st->should_run = cpuhp_next_state(bringup, &state, st, st->target);
1084 st->result = cpuhp_invoke_callback(cpu, state, bringup, st->node, &st->last);
1092 st->result = cpuhp_invoke_callback(cpu, state, bringup, st->node, &st->last);
1106 cpuhp_lock_release(bringup);
1110 complete_ap_thread(st, bringup);
1115 cpuhp_invoke_ap_callback(int cpu, enum cpuhp_state state, bool bringup,
1135 return cpuhp_invoke_callback(cpu, state, bringup, node, NULL);
1141 st->bringup = bringup;
1152 st->bringup = !bringup;
1646 * online bringup to the hotplug thread.
1860 * On architectures which have enabled parallel bringup this invokes all BP
1863 * bringup code in parallel and then wait for the control CPU to release
1910 /* Try parallel bringup optimization if enabled */
1914 /* Full per CPU serialized bringup */
2152 * releases it for the complete bringup.
2155 .name = "cpu:bringup",
2162 * All-in-one CPU bringup state which includes the kick alive.
2165 .name = "cpu:bringup",
2374 static int cpuhp_issue_call(int cpu, enum cpuhp_state state, bool bringup,
2384 if (cpuhp_step_empty(bringup, sp))
2387 * The non AP bound callbacks can fail on bringup. On teardown
2392 ret = cpuhp_invoke_ap_callback(cpu, state, bringup, node);
2394 ret = cpuhp_invoke_callback(cpu, state, bringup, node, NULL);
2396 ret = cpuhp_invoke_callback(cpu, state, bringup, node, NULL);
2398 BUG_ON(ret && !bringup);