In fact, before this change, if bringing up or tearing down a
CPU fails with -EBUSY, we BUG_ON() and never get to see what
CPU caused the problem.

Signed-off-by: Dario Faggioli <dario.faggi...@citrix.com>
Cc: Jan Beulich <jbeul...@suse.com>
Cc: Andrew Cooper <andrew.coop...@citrix.com>
Cc: Keir Fraser <k...@xen.org>
---
 xen/common/cpu.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/common/cpu.c b/xen/common/cpu.c
index 47e8b5b..8f5eb4b 100644
--- a/xen/common/cpu.c
+++ b/xen/common/cpu.c
@@ -187,8 +187,8 @@ int disable_nonboot_cpus(void)
 
         if ( (error = cpu_down(cpu)) )
         {
-            BUG_ON(error == -EBUSY);
             printk("Error taking CPU%d down: %d\n", cpu, error);
+            BUG_ON(error == -EBUSY);
             break;
         }
 
@@ -209,8 +209,8 @@ void enable_nonboot_cpus(void)
     {
         if ( (error = cpu_up(cpu)) )
         {
-            BUG_ON(error == -EBUSY);
             printk("Error taking CPU%d up: %d\n", cpu, error);
+            BUG_ON(error == -EBUSY);
         }
     }
 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to