xen/arm: Enable cpu_hotplug.c

Build cpu_hotplug for ARM and ARM64 guests.

Rename arch_(un)register_cpu to xen_(un)register_cpu and provide an
empty implementation on ARM and ARM64. On x86 just call
arch_(un)register_cpu as we are already doing.

Initialize cpu_hotplug on ARM.

Signed-off-by: Stefano Stabellini <[email protected]>
Reviewed-by: Julien Grall <[email protected]>
Reviewed-by: Boris Ostrovsky <[email protected]>
This commit is contained in:
Stefano Stabellini 2015-10-22 16:20:46 +00:00 • committed by David Vrabel
commit a314e3eb84
5 changed files with 36 additions and 4 deletions

View file

@ -1,6 +1,4 @@
ifeq ($(filter y, $(CONFIG_ARM) $(CONFIG_ARM64)),)
obj-$(CONFIG_HOTPLUG_CPU) += cpu_hotplug.o
endif
obj-$(CONFIG_X86) += fallback.o
obj-y += grant-table.o features.o balloon.o manage.o preempt.o
obj-y += events/

View file

@ -11,7 +11,7 @@
static void enable_hotplug_cpu(int cpu)
{
if (!cpu_present(cpu))
arch_register_cpu(cpu);
xen_arch_register_cpu(cpu);
set_cpu_present(cpu, true);
}
@ -19,7 +19,7 @@ static void enable_hotplug_cpu(int cpu)
static void disable_hotplug_cpu(int cpu)
{
if (cpu_present(cpu))
arch_unregister_cpu(cpu);
xen_arch_unregister_cpu(cpu);
set_cpu_present(cpu, false);
}
@ -102,7 +102,11 @@ static int __init setup_vcpu_hotplug_event(void)
static struct notifier_block xsn_cpu = {
.notifier_call = setup_cpu_watcher };
#ifdef CONFIG_X86
if (!xen_pv_domain())
#else
if (!xen_domain())
#endif
return -ENODEV;
register_xenstore_notifier(&xsn_cpu);