All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: xen-devel@lists.xen.org
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Keir Fraser <keir@xen.org>, Jan Beulich <JBeulich@suse.com>
Subject: [PATCH 1/3] xen: always print offending CPU on bringup/teardown failure
Date: Wed, 06 May 2015 17:10:25 +0200	[thread overview]
Message-ID: <20150506151024.9537.43186.stgit@Solace.station> (raw)
In-Reply-To: <20150506143312.9537.1503.stgit@Solace.station>

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.faggioli@citrix.com>
Cc: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Keir Fraser <keir@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);
         }
     }

  reply	other threads:[~2015-05-06 15:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06 15:10 [PATCH 0/3] xen: cpupools: avoid crashing when shutting down/suspending with free CPUs Dario Faggioli
2015-05-06 15:10 ` Dario Faggioli [this message]
2015-05-07 13:17   ` [PATCH 1/3] xen: always print offending CPU on bringup/teardown failure Jan Beulich
2015-05-06 15:10 ` [PATCH 2/3] xen: cpupool: assigning a CPU to a pool can fail Dario Faggioli
2015-05-07  4:52   ` Juergen Gross
2015-05-06 15:10 ` [PATCH 3/3] xen: cpupools: avoid crashing if shutting down with free CPUs Dario Faggioli
2015-05-08 10:20   ` Juergen Gross
2015-05-08 10:34     ` Jan Beulich
     [not found]     ` <554CAD480200007800078288@suse.com>
2015-05-08 10:47       ` Juergen Gross
2015-05-08 13:12         ` Dario Faggioli
2015-05-08 13:18           ` Juergen Gross
2015-05-08 13:32             ` Dario Faggioli
2015-05-08 13:57           ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150506151024.9537.43186.stgit@Solace.station \
    --to=dario.faggioli@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.