aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/cpu.c
Commit message (Collapse)AuthorAgeFilesLines
* xen: allow global VIRQ handlers to be delegated to other domainsDaniel De Graaf2012-01-281-2/+2
| | | | | | | | | | | | | | | | | This patch sends global VIRQs to a domain designated as the VIRQ handler instead of sending all global VIRQ events to dom0. This is required in order to run xenstored in a stubdom, because VIRQ_DOM_EXC must be sent to xenstored for domain destruction to work properly. This patch was inspired by the xenstored stubdomain patch series sent to xen-devel by Alex Zeffertt in 2009. Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com> Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* 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 cpumask accessors referencing NR_CPUSJan Beulich2011-10-211-3/+3
| | | | | | | ... in favor of using the new, nr_cpumask_bits-based ones. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* introduce and use nr_cpu_ids and nr_cpumask_bitsJan Beulich2011-10-211-2/+8
| | | | | | | | | | | | | | | The former is the runtime equivalent of NR_CPUS (and users of NR_CPUS, where necessary, get adjusted accordingly), while the latter is for the sole use of determining the allocation size when dynamically allocating CPU masks (done later in this series). Adjust accessors to use either of the two to bound their bitmap operations - which one gets used depends on whether accessing the bits in the gap between nr_cpu_ids and nr_cpumask_bits is benign but more efficient. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* move register_cpu_notifier() into .init.textJan Beulich2011-04-021-1/+2
| | | | | | | With no modular drivers, all CPU notifier setup is supposed to happen during boot. There also is a respective comment in the function.=20 Signed-off-by: Jan Beulich <jbeulich@novell.com>
* cpu hotplug: Core functions are quiet on failure.Keir Fraser2011-01-141-2/+0
| | | | | | | | | | | This was already inconsistent, so make them consistently quiet and leave it to callers to log an error. Add suitable error logging to the arch-specific CPU bringup loops, In particular this avoids printing error on EBUSY, in which case caller may want a silent retry loop. Signed-off-by: Keir Fraser <keir@xen.org>
* Add CPU_STARTING notifier during CPU bringup.Keir Fraser2010-12-091-0/+8
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* x86: Pull dynamic memory allocation out of do_boot_cpu().Keir Fraser2010-05-181-1/+1
| | | | | | | | | | | | This has two advantages: (a) We can move the allocations to a context where we can handle failure. (b) We can implement matching deallocations on CPU offline. Only the idle vcpu structure is now not freed on CPU offline. This probably does not really matter. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Clean up notifier-chain interface and use new interface in CPU hotplug.Keir Fraser2010-05-181-36/+27
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Some cleanups to cpu offline handling.Keir Fraser2010-05-141-1/+2
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* cpu: Quieten normal CPU hotplug operations.Keir Fraser2010-05-141-10/+0
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Move cpu hotplug routines into common cpu.c file.Keir Fraser2010-05-141-13/+176
| | | | | | | | | 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>
* x86: Implement cpu hotplug notifiers. Use them.Keir Fraser2010-05-141-0/+34
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Pass cpumasks by reference always.Keir Fraser2009-05-271-0/+26
Rather than passing cpumasks by value in all cases (which is problematic for large NR_CPUS configurations), pass them 'by reference' (i.e. through a pointer to a const cpumask). On x86 this changes send_IPI_mask() to always only send IPIs to remote CPUs (meaning any caller needing to handle the current CPU as well has to do so on its own). Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>