Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932302Ab2ENUVu (ORCPT ); Mon, 14 May 2012 16:21:50 -0400 Received: from mail-yx0-f202.google.com ([209.85.213.202]:38043 "EHLO mail-yx0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757640Ab2ENUVs (ORCPT ); Mon, 14 May 2012 16:21:48 -0400 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1790 Lines: 44 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 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) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/