Lines Matching refs:msdata
157 static void set_state(struct multi_stop_data *msdata, in set_state() argument
161 atomic_set(&msdata->thread_ack, msdata->num_threads); in set_state()
163 msdata->state = newstate; in set_state()
167 static void ack_state(struct multi_stop_data *msdata) in ack_state() argument
169 if (atomic_dec_and_test(&msdata->thread_ack)) in ack_state()
170 set_state(msdata, msdata->state + 1); in ack_state()
176 struct multi_stop_data *msdata = data; in multi_cpu_stop() local
188 if (!msdata->active_cpus) in multi_cpu_stop()
191 is_active = cpumask_test_cpu(cpu, msdata->active_cpus); in multi_cpu_stop()
197 if (msdata->state != curstate) { in multi_cpu_stop()
198 curstate = msdata->state; in multi_cpu_stop()
206 err = msdata->fn(msdata->data); in multi_cpu_stop()
211 ack_state(msdata); in multi_cpu_stop()
259 struct multi_stop_data msdata; in stop_two_cpus() local
262 msdata = (struct multi_stop_data){ in stop_two_cpus()
271 .arg = &msdata, in stop_two_cpus()
276 set_state(&msdata, MULTI_STOP_PREPARE); in stop_two_cpus()
538 struct multi_stop_data msdata = { in __stop_machine() local
554 WARN_ON_ONCE(msdata.num_threads != 1); in __stop_machine()
565 set_state(&msdata, MULTI_STOP_PREPARE); in __stop_machine()
566 return stop_cpus(cpu_online_mask, multi_cpu_stop, &msdata); in __stop_machine()
606 struct multi_stop_data msdata = { .fn = fn, .data = data, in stop_machine_from_inactive_cpu() local
613 msdata.num_threads = num_active_cpus() + 1; /* +1 for local */ in stop_machine_from_inactive_cpu()
620 set_state(&msdata, MULTI_STOP_PREPARE); in stop_machine_from_inactive_cpu()
622 queue_stop_cpus_work(cpu_active_mask, multi_cpu_stop, &msdata, in stop_machine_from_inactive_cpu()
624 ret = multi_cpu_stop(&msdata); in stop_machine_from_inactive_cpu()