aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/stop_machine.c
Commit message (Collapse)AuthorAgeFilesLines
* eliminate first_cpu() etcJan Beulich2011-11-081-1/+1
| | | | | | | | This includes the conversion from for_each_cpu_mask() to for_each-cpu(). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
* eliminate direct assignments of CPU masksJan Beulich2011-10-211-3/+3
| | | | | | | | | | | | | | | | Use cpumask_copy() instead of direct variable assignments for copying CPU masks. While direct assignments are not a problem when both sides are variables actually defined as cpumask_t (except for possibly copying *much* more than would actually need to be copied), they must not happen when the original variable is of type cpumask_var_t (which may have lass space allocated to it than a full cpumask_t). Eliminate as many of such assignments as possible (in several cases it's even possible to collapse two operations [copy then clear one bit] into one [cpumask_andnot()]), and thus set the way for reducing the allocation size in alloc_cpumask_var(). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* stop_machine: Allow specified function to run on all CPUs.Keir Fraser2011-01-141-3/+12
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* Remove many uses of cpu_possible_map and iterators over NR_CPUS.Keir Fraser2010-05-141-3/+22
| | | | | | | The significant remaining culprits for x86 are credit2, hpet, and percpu-area subsystems. To be dealt with in a separate patch. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* stop_machine: Pass cpu number to tasklet handler.Keir Fraser2010-05-141-1/+1
| | | | | | Otherwise the BUG_ON() I added to the handler always BUGs! Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Move cpu hotplug routines into common cpu.c file.Keir Fraser2010-05-141-7/+13
| | | | | | | | | Also simplify the locking (reverting to use if spin_trylock, as returning EBUSY/EAGAIN seems unavoidable after all). In particular this should continue to ensure that stop_machine_run() does not have cpu_online_map change under its feet. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Synchronise lazy execstate before calling tasklet handlers.Keir Fraser2010-04-191-2/+0
| | | | | | | | This ensures we are properly running on idle-vcpu state, which certain things (e.g., use of vmx_vmcs_{enter,exit}) rely on. It also means we don't need to do the same thing in the stopmachine_run handler. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* stopmachine: Implement using tasklets rather than a softirq.Keir Fraser2010-04-191-8/+11
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xen: Small cleanups towards allowing stricter compile warnings.Keir Fraser2008-07-151-0/+1
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* xen: Clean up SMP/hotplug headers and implementation a bit.Keir Fraser2008-02-131-15/+5
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Rendezvous selected cpus in softirq (stop_machine).Keir Fraser2008-02-111-0/+168
This is similar to stop_machine_run stub from Linux, to pull selected cpus in rendezvous point and the do some batch work under a safe environment. Current one usage is from S3 path, where individual cpu is pulled down with related online footprints being cleared. It's dangerous to have other cpus checking clobbered data structure in the middle, such as cpu_online_map, cpu_sibling_map, etc. Signed-off-by: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>