From patchwork Mon May 14 20:21:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 159155 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 49085B703A for ; Tue, 15 May 2012 06:21:52 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932240Ab2ENUVt (ORCPT ); Mon, 14 May 2012 16:21:49 -0400 Received: from mail-yx0-f202.google.com ([209.85.213.202]:58552 "EHLO mail-yx0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757665Ab2ENUVs (ORCPT ); Mon, 14 May 2012 16:21:48 -0400 Received: by yenl3 with SMTP id l3so657012yen.1 for ; Mon, 14 May 2012 13:21:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=6zcSOXKxVzibFHMM4Majf6ef3PG8IjPBY79j5bQS5G4=; b=pfXgFRkKPQmQIezx0hckI9ZcWRzS2aFh8pWD0tR3R3Sez3HtFSsk0JkCRvlTAKoPqQ gaJFJtFgHg1UNgjhi6/82jV0NzTtjFeCXFH7mSTRLbr/pUr9ZoSIQA3uMdildb7WJdNQ LGCsyFUCYeNHtuG7Njj73C2Ynb1cO/z8kEpo+ZKa9FCUIktGTWy8jW3Vzl5KFnayM2FS Q5RHwDNHZtwIDndyu+kjwzm+0LCUQuDid5bBkoJWU8oMpycb9peiX4mzZGmiO9ZatMCv SLTqUAG6Z2XCkAEhUhO6AipP8VYYmruicwOAcasOkmew3DFE3ejTYQaqvXpH1grRCW7J kQMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent :x-gm-message-state; bh=6zcSOXKxVzibFHMM4Majf6ef3PG8IjPBY79j5bQS5G4=; b=m1FX3Gj2J/gFDB7P3tHsJ62ZOB2BUmgUtOZRPlE3CxImDLFoLpOwbr4YXAnbczn0Qm hG1KpBeI5zFe4AwWMeog2VAyE4xR74GWdIh8EHaixHdZdqUN9X92B14j4Pi+AuuOo4pF 018L5zvid5OAkko2Nf2HRXkdViO3y2PMcg3Fbg5vpVgG66RWrh94pYCB9r/EjL6MVCkD Dw1qgKakWCt60OAsZMzb5MvUOw+sqqchuwkh+xQmPU8qKKCg8EtD1Jeq8hw9uxrBvOul IuGMNrQTNQmcyte+pLqn4tvWk/3yXcDR4sMgn6YjnDVKGVFhPeL7G8Y7DXI6/Xga7QtR baLA== Received: by 10.236.201.229 with SMTP id b65mr14435451yho.9.1337026907900; Mon, 14 May 2012 13:21:47 -0700 (PDT) Received: by 10.236.201.229 with SMTP id b65mr14435437yho.9.1337026907839; Mon, 14 May 2012 13:21:47 -0700 (PDT) Received: from wpzn4.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id n15si506955anq.2.2012.05.14.13.21.47 (version=TLSv1/SSLv3 cipher=AES128-SHA); Mon, 14 May 2012 13:21:47 -0700 (PDT) Received: from bhelgaas.mtv.corp.google.com (bhelgaas.mtv.corp.google.com [172.18.96.155]) by wpzn4.hot.corp.google.com (Postfix) with ESMTP id B6A3F1E004D; Mon, 14 May 2012 13:21:47 -0700 (PDT) Received: by bhelgaas.mtv.corp.google.com (Postfix, from userid 131485) id 57FA91806CE; Mon, 14 May 2012 13:21:47 -0700 (PDT) Date: Mon, 14 May 2012 14:21:47 -0600 From: Bjorn Helgaas To: Meelis Roos Cc: Myron Stowe , Linux Kernel list , Jesse Barnes , linux-pci@vger.kernel.org Subject: Re: x86: runtime waring in pcibios_fwaddrmap_lookup Message-ID: <20120514202147.GA20652@google.com> References: <1335557685.2386.62.camel@zim.stowe> <1335905694.2386.138.camel@zim.stowe> <1336430699.2427.117.camel@zim.stowe> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Gm-Message-State: ALoCoQnQUu84cTCS0rjvjrYZ32aOqhXab+hn8oXGfB/2cCpXW04BPd1TtZi4utfTYUf0/9poOmXE7DYp+n5GSAS1+6PGFyYWk6YX5YlXiTiw8OEqdNU6PYJ7Xuw3e3AGLSuPmXvuXQ5tlWN0iAFtYjUzvF/o/iUIaw== Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Sun, May 13, 2012 at 06:15:18PM +0300, Meelis Roos wrote: > > > Thanks for the quick response Meelis (unlike myself; I've been consumed > > > with a hard deadline task recently - sorry). > > Not so quick this time - I had to replace the HDD and then recreate the > failing config. Took 2.4-rc7 as a base. This gives us another data point > - it does not warn on SMP but warns only on UP. I think that's the critical point; thanks for mentioning it :) The following patch should fix it. Can you confirm? commit d7d1398aa087445ce04a1b1d45c4de7485590f57 Author: Bjorn Helgaas Date: Mon May 14 12:01:26 2012 -0600 x86/PCI: only check for spinlock being held in SMP kernels spin_is_locked() is always false on UP kernels: spin_lock_irqsave() does no locking, so we can't tell whether the lock is held or not. Therefore, this warning is only valid for SMP kernels. Reported-and-tested-by: Meelis Roos CC: Myron Stowe Signed-off-by: Bjorn Helgaas --- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 831971e..dd8ca6f 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c @@ -57,7 +57,7 @@ static struct pcibios_fwaddrmap *pcibios_fwaddrmap_lookup(struct pci_dev *dev) { struct pcibios_fwaddrmap *map; - WARN_ON(!spin_is_locked(&pcibios_fwaddrmap_lock)); + WARN_ON_SMP(!spin_is_locked(&pcibios_fwaddrmap_lock)); list_for_each_entry(map, &pcibios_fwaddrmappings, list) if (map->dev == dev)