From patchwork Tue Dec 4 22:13:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot for Kobe Wu X-Patchwork-Id: 10712631 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 14B0613A4 for ; Tue, 4 Dec 2018 22:13:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02BB32C881 for ; Tue, 4 Dec 2018 22:13:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6CDB2C896; Tue, 4 Dec 2018 22:13:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B2A32C881 for ; Tue, 4 Dec 2018 22:13:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725904AbeLDWN0 (ORCPT ); Tue, 4 Dec 2018 17:13:26 -0500 Received: from terminus.zytor.com ([198.137.202.136]:47463 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725875AbeLDWN0 (ORCPT ); Tue, 4 Dec 2018 17:13:26 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id wB4MDAUV1031962 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 4 Dec 2018 14:13:10 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id wB4MDAZG1031959; Tue, 4 Dec 2018 14:13:10 -0800 Date: Tue, 4 Dec 2018 14:13:10 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Lance Roy Message-ID: Cc: paulmck@linux.ibm.com, x86@kernel.org, bp@alien8.de, mingo@redhat.com, linux-pci@vger.kernel.org, ldr709@gmail.com, mingo@kernel.org, bhelgaas@google.com, tglx@linutronix.de, hpa@zytor.com Reply-To: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, mingo@redhat.com, bp@alien8.de, x86@kernel.org, paulmck@linux.ibm.com, tglx@linutronix.de, hpa@zytor.com, mingo@kernel.org, bhelgaas@google.com, ldr709@gmail.com To: linux-tip-commits@vger.kernel.org Subject: [tip:core/rcu] x86/PCI: Replace spin_is_locked() with lockdep Git-Commit-ID: 868f7a09a4f385e5167fc0ff9ec4c3f817897f3a X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Disposition: inline Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit-ID: 868f7a09a4f385e5167fc0ff9ec4c3f817897f3a Gitweb: https://git.kernel.org/tip/868f7a09a4f385e5167fc0ff9ec4c3f817897f3a Author: Lance Roy AuthorDate: Thu, 4 Oct 2018 23:45:38 -0700 Committer: Paul E. McKenney CommitDate: Thu, 8 Nov 2018 21:53:35 -0800 x86/PCI: Replace spin_is_locked() with lockdep lockdep_assert_held() is better suited to checking locking requirements, since it only checks if the current thread holds the lock regardless of whether someone else does. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Bjorn Helgaas Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Cc: Signed-off-by: Paul E. McKenney --- arch/x86/pci/i386.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 8cd66152cdb0..9df652d3d927 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c @@ -59,7 +59,7 @@ static struct pcibios_fwaddrmap *pcibios_fwaddrmap_lookup(struct pci_dev *dev) { struct pcibios_fwaddrmap *map; - WARN_ON_SMP(!spin_is_locked(&pcibios_fwaddrmap_lock)); + lockdep_assert_held(&pcibios_fwaddrmap_lock); list_for_each_entry(map, &pcibios_fwaddrmappings, list) if (map->dev == dev)