Lines Matching refs:msdata

165 static void set_state(struct multi_stop_data *msdata,  in set_state()  argument
169 atomic_set(&msdata->thread_ack, msdata->num_threads); in set_state()
171 msdata->state = newstate; in set_state()
175 static void ack_state(struct multi_stop_data *msdata) in ack_state() argument
177 if (atomic_dec_and_test(&msdata->thread_ack)) in ack_state()
178 set_state(msdata, msdata->state + 1); in ack_state()
184 struct multi_stop_data *msdata = data; in multi_cpu_stop() local
196 if (!msdata->active_cpus) in multi_cpu_stop()
199 is_active = cpumask_test_cpu(cpu, msdata->active_cpus); in multi_cpu_stop()
205 if (msdata->state != curstate) { in multi_cpu_stop()
206 curstate = msdata->state; in multi_cpu_stop()
214 err = msdata->fn(msdata->data); in multi_cpu_stop()
219 ack_state(msdata); in multi_cpu_stop()
311 struct multi_stop_data msdata; in stop_two_cpus() local
313 msdata = (struct multi_stop_data){ in stop_two_cpus()
322 .arg = &msdata, in stop_two_cpus()
327 set_state(&msdata, MULTI_STOP_PREPARE); in stop_two_cpus()
586 struct multi_stop_data msdata = { in stop_machine_cpuslocked() local
604 WARN_ON_ONCE(msdata.num_threads != 1); in stop_machine_cpuslocked()
615 set_state(&msdata, MULTI_STOP_PREPARE); in stop_machine_cpuslocked()
616 return stop_cpus(cpu_online_mask, multi_cpu_stop, &msdata); in stop_machine_cpuslocked()
656 struct multi_stop_data msdata = { .fn = fn, .data = data, in stop_machine_from_inactive_cpu() local
663 msdata.num_threads = num_active_cpus() + 1; /* +1 for local */ in stop_machine_from_inactive_cpu()
670 set_state(&msdata, MULTI_STOP_PREPARE); in stop_machine_from_inactive_cpu()
672 queue_stop_cpus_work(cpu_active_mask, multi_cpu_stop, &msdata, in stop_machine_from_inactive_cpu()
674 ret = multi_cpu_stop(&msdata); in stop_machine_from_inactive_cpu()