|
@@ -126,15 +126,6 @@ struct cpuhp_step {
|
|
|
static DEFINE_MUTEX(cpuhp_state_mutex);
|
|
|
static struct cpuhp_step cpuhp_hp_states[];
|
|
|
|
|
|
-static bool cpuhp_is_ap_state(enum cpuhp_state state)
|
|
|
-{
|
|
|
- /*
|
|
|
- * The extra check for CPUHP_TEARDOWN_CPU is only for documentation
|
|
|
- * purposes as that state is handled explicitly in cpu_down.
|
|
|
- */
|
|
|
- return state > CPUHP_BRINGUP_CPU && state != CPUHP_TEARDOWN_CPU;
|
|
|
-}
|
|
|
-
|
|
|
static struct cpuhp_step *cpuhp_get_step(enum cpuhp_state state)
|
|
|
{
|
|
|
return cpuhp_hp_states + state;
|
|
@@ -235,6 +226,15 @@ err:
|
|
|
}
|
|
|
|
|
|
#ifdef CONFIG_SMP
|
|
|
+static bool cpuhp_is_ap_state(enum cpuhp_state state)
|
|
|
+{
|
|
|
+ /*
|
|
|
+ * The extra check for CPUHP_TEARDOWN_CPU is only for documentation
|
|
|
+ * purposes as that state is handled explicitly in cpu_down.
|
|
|
+ */
|
|
|
+ return state > CPUHP_BRINGUP_CPU && state != CPUHP_TEARDOWN_CPU;
|
|
|
+}
|
|
|
+
|
|
|
static inline void wait_for_ap_thread(struct cpuhp_cpu_state *st, bool bringup)
|
|
|
{
|
|
|
struct completion *done = bringup ? &st->done_up : &st->done_down;
|