Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2776148imm; Wed, 3 Oct 2018 09:01:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV63V1pJgnuEvhCT3pexhFxc5L7VIu0oj2miFXjy3Cu7ybsGZtZcUd0rC3k9qrtFNbil9pvTx X-Received: by 2002:a62:1112:: with SMTP id z18-v6mr2321278pfi.200.1538582481484; Wed, 03 Oct 2018 09:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538582481; cv=none; d=google.com; s=arc-20160816; b=kkKU+6Th3as45EhOsVLSHnhZOViNC5QTU5Kz/JjuS9+QOWB87HQFMnv67fPKwUdLy1 7ChM5sCkt5uEJH2qubo9EhyIvOS1ksZif446py8cR7M6Auntr/RSPdlbzWYmFMB+RyEf PDvMxOUUL+DFzf1H2G7fYtPxz+Gi6qXSw2bGN/5VOr1eE7m1DjuEJUmjJ/kgjGwD236/ eU2Z3TLo894wh+ifthPrfIlXRWx884SxYNOP9lLWEhmXdC9EEAiC6rLBHTLCgy9rkcHy ms4g7JHGCioGqVzRStUEQ7fPxV7PEwomqNA5ZLW/IIUhbJ2XNBBzMmsLCS7vQ30AgwUK 0bWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=b1XO7HBIh1tbb3THbeFdORZFoPxD0yfcwQWl6m4ZofI=; b=C6VJ9Ht1pHU6hgFsw7/qDVaMZJnzK1FhS6NzW+y86I7EpTQDZ4QcUE9FWv8ptka8GD OezgylNm6U08c3nP+VvcbS1Wglkf0M1FgTkeiLfjVrvKOaqcCbhiD9N0sVYLrnKcdVAS 3LT1M3EwGyxZsDoMfGk4sNZsICefC2xl/BAopEtWhz6yWl9ddmSRlC0HK+nJvI9V4LBr Y9GmGTssDe/it1mHw+3poO0UH/NoOWewovdSrNJqPVn35Ws/k37eqAzg3qAo9Ys1FDu2 ev7q8PaCpUkd5kS6TZzCmIckIZpWqqWHZcCKloTnJ8DHaGGuNaktHbbbgr//uBQ+uyc2 NBkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="vwmz/wg9"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31-v6si2016666plg.296.2018.10.03.09.01.05; Wed, 03 Oct 2018 09:01:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="vwmz/wg9"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727450AbeJCWtx (ORCPT + 99 others); Wed, 3 Oct 2018 18:49:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:35404 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726819AbeJCWtw (ORCPT ); Wed, 3 Oct 2018 18:49:52 -0400 Received: from localhost (unknown [64.22.249.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D15972089F; Wed, 3 Oct 2018 16:00:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1538582453; bh=CDuJLaorSungbZRfLtKY71JC7+5e1F9M4ZS1KNsJd98=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vwmz/wg9tM2twKiBCs/z/lTP+xnqdTtH5fIv8jymuGsQkUNKXfvMleWrMDKxBKsG9 r9FQY1/gMMOhMCfasIs2MmMOQ9TzKtpZc52INpQOmE8H2J4yqTSqDKS5S1vDmMFC9T ZzWZSamlHmDwzT83wUIQlZzOZKJHkrfCUvn68tuo= Date: Wed, 3 Oct 2018 11:00:51 -0500 From: Bjorn Helgaas To: Lance Roy Cc: linux-kernel@vger.kernel.org, "Paul E. McKenney" , Bjorn Helgaas , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH 01/16] x86/PCI: Replace spin_is_locked() with lockdep Message-ID: <20181003160051.GF120535@bhelgaas-glaptop.roam.corp.google.com> References: <20181003053902.6910-1-ldr709@gmail.com> <20181003053902.6910-2-ldr709@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181003053902.6910-2-ldr709@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 02, 2018 at 10:38:47PM -0700, Lance Roy wrote: > lockdep_assert_held() is better suited to checking locking requirements, > since it won't get confused when someone else holds the lock. 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: I assume you plan to merge the whole series together. I don't object to that, but I don't know enough to be able to formally ack this. It would be useful to include a tiny bit more detail in the changelog. The spin_is_locked() documentation doesn't mention anything about differences with respect to the lock being held by self vs by someone else, so I can't tell where the confusion arises. Bjorn > --- > 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 ed4ac215305d..24bb58a007de 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) > -- > 2.19.0 >