WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Fix SMP boot for kernels without CONFIG_HOTPLUG_CPU.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix SMP boot for kernels without CONFIG_HOTPLUG_CPU.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 28 May 2006 16:08:10 +0000
Delivery-date: Sun, 28 May 2006 09:09:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 444abe25611f151194e042539bc9c76404cfccbd
# Parent  71fa0e0d520ccd7dfe446418020e6cc199d18fe2
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@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c |    2 +-
 linux-2.6-xen-sparse/drivers/xen/core/smpboot.c     |    2 +-
 linux-2.6-xen-sparse/include/xen/cpu_hotplug.h      |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff -r 71fa0e0d520c -r 444abe25611f 
linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c       Sat May 27 
10:13:27 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c       Sun May 28 
09:46:30 2006 +0100
@@ -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 -r 71fa0e0d520c -r 444abe25611f 
linux-2.6-xen-sparse/drivers/xen/core/smpboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c   Sat May 27 10:13:27 
2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c   Sun May 28 09:46:30 
2006 +0100
@@ -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 -r 71fa0e0d520c -r 444abe25611f 
linux-2.6-xen-sparse/include/xen/cpu_hotplug.h
--- a/linux-2.6-xen-sparse/include/xen/cpu_hotplug.h    Sat May 27 10:13:27 
2006 +0100
+++ b/linux-2.6-xen-sparse/include/xen/cpu_hotplug.h    Sun May 28 09:46:30 
2006 +0100
@@ -13,14 +13,14 @@ void cpu_initialize_context(unsigned int
 #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)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix SMP boot for kernels without CONFIG_HOTPLUG_CPU., Xen patchbot-unstable <=