From nobody Thu Apr 25 09:04:48 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1578480256; cv=none; d=zohomail.com; s=zohoarc; b=E63Vs37alvID3kOxF1Ff28pcbYmT4ExvRHjIxSdjGBXhluMWG6XtxI8HXFlIx9oeo1wKv35xM8SksGEubYzAOrCH6XFpnwRPFR3e9GgY3QSEqLfR6kxCGR3GHxczW+5e0wbdE4n+sfoDGSbCSr1JV87RgelzGjnm5GCNYCkU9Z0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578480256; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=MgNWEHd7uzwIVcYouFpZjU+AoYGzkXDExTZqlszwKsI=; b=GeHepvilx6SuwFMKJjafy++FHZ4qAEoLJEJ4fP0aP0TRRF7wfeW4UKQxUp+/DkmqKd/EiarU7aZpivB2wJvf6N9tjCp6AgwWERCTN6DWsBNLzhy6SozBQDzeX0/Gnuu8OmHfJUMLgnUJdP0laD30wMYrjFoI3rNz5mXR6I1/dKU= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 157848025640644.55100290103144; Wed, 8 Jan 2020 02:44:16 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ip8oN-0000Wr-W2; Wed, 08 Jan 2020 10:43:39 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ip8oM-0000Wi-Ei for xen-devel@lists.xenproject.org; Wed, 08 Jan 2020 10:43:38 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b470760c-3203-11ea-b56d-bc764e2007e4; Wed, 08 Jan 2020 10:43:28 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 83F4AAEFB; Wed, 8 Jan 2020 10:43:27 +0000 (UTC) X-Inumbo-ID: b470760c-3203-11ea-b56d-bc764e2007e4 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Wed, 8 Jan 2020 11:43:24 +0100 Message-Id: <20200108104324.16928-1-jgross@suse.com> X-Mailer: git-send-email 2.16.4 Subject: [Xen-devel] [PATCH] xen/spinlock: disable spinlock debugging in console_force_unlock() X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Jan Beulich MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" console_force_unlock() might result in subsequent ASSERT() triggering when CONFIG_DEBUG_LOCKS was active. Avoid that by calling spin_debug_disable() in console_force_unlock() and make the spinlock debug assertions trigger only if spin_debug was active. Signed-off-by: Juergen Gross --- xen/common/spinlock.c | 2 +- xen/drivers/char/console.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c index ed69f0a4d2..2a06de3e6a 100644 --- a/xen/common/spinlock.c +++ b/xen/common/spinlock.c @@ -85,7 +85,7 @@ static void got_lock(union lock_debug *debug) =20 static void rel_lock(union lock_debug *debug) { - ASSERT(debug->cpu =3D=3D smp_processor_id()); + ASSERT(atomic_read(&spin_debug) <=3D 0 || debug->cpu =3D=3D smp_proces= sor_id()); debug->cpu =3D SPINLOCK_NO_CPU; } =20 diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index b31d789a5d..4bcbbfa7d6 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -1077,6 +1077,7 @@ void console_unlock_recursive_irqrestore(unsigned lon= g flags) void console_force_unlock(void) { watchdog_disable(); + spin_debug_disable(); spin_lock_init(&console_lock); serial_force_unlock(sercon_handle); console_locks_busted =3D 1; --=20 2.16.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel