Patchwork x86: runtime waring in pcibios_fwaddrmap_lookup

login
register
mail settings
Submitter Bjorn Helgaas
Date May 14, 2012, 8:21 p.m.
Message ID <20120514202147.GA20652@google.com>
Download mbox | patch
Permalink /patch/159155/
State Accepted
Headers show

Comments

Bjorn Helgaas - May 14, 2012, 8:21 p.m.
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 <bhelgaas@google.com>
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 <mroos@linux.ee>
    CC: Myron Stowe <myron.stowe@redhat.com>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

--
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
Meelis Roos - May 14, 2012, 8:53 p.m.
> > > > 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?

Yes, that fixes it, thanks!
Bjorn Helgaas - May 15, 2012, 11:02 p.m.
On Mon, May 14, 2012 at 1:53 PM, Meelis Roos <mroos@linux.ee> 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?
>
> Yes, that fixes it, thanks!

I applied this to my "next" branch.

Bjorn
--
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

Patch

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)