Lines Matching refs:msdata

152 static void set_state(struct multi_stop_data *msdata,  in set_state()  argument
156 atomic_set(&msdata->thread_ack, msdata->num_threads); in set_state()
158 msdata->state = newstate; in set_state()
162 static void ack_state(struct multi_stop_data *msdata) in ack_state() argument
164 if (atomic_dec_and_test(&msdata->thread_ack)) in ack_state()
165 set_state(msdata, msdata->state + 1); in ack_state()
171 struct multi_stop_data *msdata = data; in multi_cpu_stop() local
183 if (!msdata->active_cpus) in multi_cpu_stop()
186 is_active = cpumask_test_cpu(cpu, msdata->active_cpus); in multi_cpu_stop()
192 if (msdata->state != curstate) { in multi_cpu_stop()
193 curstate = msdata->state; in multi_cpu_stop()
201 err = msdata->fn(msdata->data); in multi_cpu_stop()
206 ack_state(msdata); in multi_cpu_stop()
249 struct multi_stop_data msdata; in stop_two_cpus() local
252 msdata = (struct multi_stop_data){ in stop_two_cpus()
261 .arg = &msdata, in stop_two_cpus()
273 set_state(&msdata, MULTI_STOP_PREPARE); in stop_two_cpus()
552 struct multi_stop_data msdata = { in __stop_machine() local
568 WARN_ON_ONCE(msdata.num_threads != 1); in __stop_machine()
579 set_state(&msdata, MULTI_STOP_PREPARE); in __stop_machine()
580 return stop_cpus(cpu_online_mask, multi_cpu_stop, &msdata); in __stop_machine()
620 struct multi_stop_data msdata = { .fn = fn, .data = data, in stop_machine_from_inactive_cpu() local
627 msdata.num_threads = num_active_cpus() + 1; /* +1 for local */ in stop_machine_from_inactive_cpu()
634 set_state(&msdata, MULTI_STOP_PREPARE); in stop_machine_from_inactive_cpu()
636 queue_stop_cpus_work(cpu_active_mask, multi_cpu_stop, &msdata, in stop_machine_from_inactive_cpu()
638 ret = multi_cpu_stop(&msdata); in stop_machine_from_inactive_cpu()