From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: [PATCH 1/3] xen: always print offending CPU on bringup/teardown failure Date: Wed, 06 May 2015 17:10:25 +0200 Message-ID: <20150506151024.9537.43186.stgit@Solace.station> References: <20150506143312.9537.1503.stgit@Solace.station> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150506143312.9537.1503.stgit@Solace.station> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Andrew Cooper , Keir Fraser , Jan Beulich List-Id: xen-devel@lists.xenproject.org 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 Cc: Jan Beulich Cc: Andrew Cooper Cc: Keir Fraser --- 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); } }