ia64/xen-unstable

changeset 10207:444abe25611f

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 <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun May 28 09:46:30 2006 +0100 (2006-05-28)
parents 71fa0e0d520c
children 6d476981e3a5
files linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c linux-2.6-xen-sparse/drivers/xen/core/smpboot.c linux-2.6-xen-sparse/include/xen/cpu_hotplug.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c	Sat May 27 10:13:27 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c	Sun May 28 09:46:30 2006 +0100
     1.3 @@ -160,7 +160,7 @@ void smp_resume(void)
     1.4  		vcpu_hotplug(cpu);
     1.5  }
     1.6  
     1.7 -int cpu_up_is_allowed(unsigned int cpu)
     1.8 +int cpu_up_check(unsigned int cpu)
     1.9  {
    1.10  	int rc = 0;
    1.11  
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c	Sat May 27 10:13:27 2006 +0100
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c	Sun May 28 09:46:30 2006 +0100
     2.3 @@ -400,7 +400,7 @@ int __devinit __cpu_up(unsigned int cpu)
     2.4  {
     2.5  	int rc;
     2.6  
     2.7 -	rc = cpu_up_is_allowed(cpu);
     2.8 +	rc = cpu_up_check(cpu);
     2.9  	if (rc)
    2.10  		return rc;
    2.11  
     3.1 --- a/linux-2.6-xen-sparse/include/xen/cpu_hotplug.h	Sat May 27 10:13:27 2006 +0100
     3.2 +++ b/linux-2.6-xen-sparse/include/xen/cpu_hotplug.h	Sun May 28 09:46:30 2006 +0100
     3.3 @@ -13,14 +13,14 @@ void cpu_initialize_context(unsigned int
     3.4  #define cpu_initialize_context(cpu)	((void)0)
     3.5  #endif
     3.6  
     3.7 -int cpu_up_is_allowed(unsigned int cpu);
     3.8 +int cpu_up_check(unsigned int cpu);
     3.9  void init_xenbus_allowed_cpumask(void);
    3.10  int smp_suspend(void);
    3.11  void smp_resume(void);
    3.12  
    3.13  #else /* !defined(CONFIG_HOTPLUG_CPU) */
    3.14  
    3.15 -#define cpu_up_is_allowed(cpu)		(1)
    3.16 +#define cpu_up_check(cpu)		(0)
    3.17  #define init_xenbus_allowed_cpumask()	((void)0)
    3.18  
    3.19  static inline int smp_suspend(void)