From: kaf24@firebug.cl.cam.ac.uk Date: Sun, 28 May 2006 08:46:30 +0000 (+0100) Subject: Fix SMP boot for kernels without CONFIG_HOTPLUG_CPU. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16013^2~25 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e8ea99cff2dc77395cc75e2b19a52e263928a0f8;p=xen.git Fix SMP boot for kernels without CONFIG_HOTPLUG_CPU. The function cpu_is_allowed() appears that it should return a boolean but in fact returns zero on success and an errno on failure. Thus rename it to the more vague cpu_up_check(), in line with its return value and thge fact it has unspecified side effects. Fix the macro definition of cpu_up_check() when building non-hotplug kernel to return zero rather than one (which always failed secondary cpu bringup!). Signed-off-by: Keir Fraser --- diff --git a/linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c b/linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c index b70e82a910..cc6be39916 100644 --- a/linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c +++ b/linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c @@ -160,7 +160,7 @@ void smp_resume(void) vcpu_hotplug(cpu); } -int cpu_up_is_allowed(unsigned int cpu) +int cpu_up_check(unsigned int cpu) { int rc = 0; diff --git a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c index a52747e833..c4995d838c 100644 --- a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c +++ b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c @@ -400,7 +400,7 @@ int __devinit __cpu_up(unsigned int cpu) { int rc; - rc = cpu_up_is_allowed(cpu); + rc = cpu_up_check(cpu); if (rc) return rc; diff --git a/linux-2.6-xen-sparse/include/xen/cpu_hotplug.h b/linux-2.6-xen-sparse/include/xen/cpu_hotplug.h index 3c4b50fbb3..6df85f949f 100644 --- a/linux-2.6-xen-sparse/include/xen/cpu_hotplug.h +++ b/linux-2.6-xen-sparse/include/xen/cpu_hotplug.h @@ -13,14 +13,14 @@ void cpu_initialize_context(unsigned int cpu); #define cpu_initialize_context(cpu) ((void)0) #endif -int cpu_up_is_allowed(unsigned int cpu); +int cpu_up_check(unsigned int cpu); void init_xenbus_allowed_cpumask(void); int smp_suspend(void); void smp_resume(void); #else /* !defined(CONFIG_HOTPLUG_CPU) */ -#define cpu_up_is_allowed(cpu) (1) +#define cpu_up_check(cpu) (0) #define init_xenbus_allowed_cpumask() ((void)0) static inline int smp_suspend(void)